- RegistryKey masterKey = Registry.LocalMachine.CreateSubKey
- ("SOFTWARE\\\\Test\\\\Preferences");
- if (masterKey == null)
- {
- Console.WriteLine ("Null Masterkey!");
- }
- else
- {
- Console.WriteLine ("MyKey = {0}", masterKey.GetValue ("MyKey"));
- }
- masterKey.Close();
- //该片段来自于http://www.codesnippet.cn/detail/030620133732.html
来源: http://www.codesnippet.cn/detail/030620133732.html