为什么不能访问run子键(方法有错?)
											如题:(访问注册表)
代码如下:
                RegistryKey ms_root=Registry.LocalMachine;
                RegistryKey ms_software=ms_root.OpenSubKey("SOFTWARE");
                RegistryKey ms_microsoft=ms_software.OpenSubKey("Microsoft");
                RegistryKey ms_windows=ms_microsoft.OpenSubKey("Windows");
                RegistryKey ms_run=ms_windows.OpenSubKey("Run");
                MessageBox.Show(ms_run.GetValue("12").ToString());
红色地方报如下错误:
未处理的“System.NullReferenceException”类型的异常出现在 new.exe 中。
其他信息: 未将对象引用设置到对象的实例。
其中:12是有值的!我自己加的~




 
											






 
	    

 
	

