private void button1_Click(object sender, EventArgs e)
{
try
{
Registry.LocalMachine.OpenSubKey(“SOFTWARE”, true).CreateSubKey(“MyWar3”).SetValue(“name”, “tovalue”);
}
catch(Exception ee)
{
throw new Exception(ee.Message);
}
}
没有发生错误,就是创建无效(到注册表去看了),单步运行也没进抓错误那里,求各位兄台帮忙啊,本人快崩溃了!
{
try
{
Registry.LocalMachine.OpenSubKey(“SOFTWARE”, true).CreateSubKey(“MyWar3”).SetValue(“name”, “tovalue”);
}
catch(Exception ee)
{
throw new Exception(ee.Message);
}
}
没有发生错误,就是创建无效(到注册表去看了),单步运行也没进抓错误那里,求各位兄台帮忙啊,本人快崩溃了!
解决方案
20
打开注册表看看你的键里有没有name这个值