关于注册表!~ 用c#怎样读、写、删除注册表信息? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 // 在HKEY_LOCAL_MACHINESoftware下建立一新键,起名为MCBInc RegistryKey key = Registry.LocalMachine.OpenSubKey("Software", true); // 增加一个子键 RegistryKey newkey = key.CreateSubKey("MCBInc"); // 设置此子键的值 newkey.SetValue("MCBInc", "NET Developer"); // 从注册表的其他地方获取数据 // 找出你的CPU RegistryKey pRegKey = Registry.LocalMachine; pRegKey = pRegKey.OpenSubKey("HARDWAREDESCRIPTIONSystemCentralProcessor"); Object val = pRegKey.GetValue("VendorIdentifier"); Debug.WriteLine("The central processor of this machine is:"+ val); // 删除键值 RegistryKey delKey = Registry.LocalMachine.OpenSubKey("Software", true); delKey.DeleteSubKey("MCBInc"); } listview和dataGridVIew 怎么样设置只读得属性? 得到打开默认程序的文件的路径? c#中的gridview如何做到自动分页打印??? 页面更新问题~~ 本地Html文件引用dll 什么是托管代码?什么是非托管代码? 在C#里如何使用microsoft graph控件? winform访问数据库 TextBox自定义控件如果调用其刷新过程 在VS2008里用C#如何开发三层式WindowsForms程序? 分不多,问题挺难,妄有大虾能帮忙 关于多线程,请看我这段代码是否有问题?
// 在HKEY_LOCAL_MACHINESoftware下建立一新键,起名为MCBInc
RegistryKey key = Registry.LocalMachine.OpenSubKey("Software", true);
// 增加一个子键
RegistryKey newkey = key.CreateSubKey("MCBInc"); // 设置此子键的值
newkey.SetValue("MCBInc", "NET Developer"); // 从注册表的其他地方获取数据 // 找出你的CPU
RegistryKey pRegKey = Registry.LocalMachine;
pRegKey = pRegKey.OpenSubKey("HARDWAREDESCRIPTIONSystemCentralProcessor");
Object val = pRegKey.GetValue("VendorIdentifier");
Debug.WriteLine("The central processor of this machine is:"+ val);
// 删除键值
RegistryKey delKey = Registry.LocalMachine.OpenSubKey("Software", true);
delKey.DeleteSubKey("MCBInc");
}