.net registry reading writing

前端 未结 2 853
一整个雨季
一整个雨季 2020-12-11 03:21

Can you refer me to some good reference how I can read write to registry via .net resources ?

I checked the site and couldn\'t find any good information.

相关标签:
2条回答
  • 2020-12-11 04:00

    Look at Microsoft.Win32.Registry. There is an abundance of sample code there. You can also look at CodeProject. Lastly, MSDN has a good overview on the Registry.

    0 讨论(0)
  • 2020-12-11 04:04

    Check out the Registry class in the BCL

    • http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx

    Example:

    using(var key = Registry.CurrentUser.OpenSubKey(@"Software\MyProduct")) {
      var value = key.GetValue("SomeValueKey");
      ..
    }
    
    0 讨论(0)
提交回复
热议问题