开发者

.net registry reading writing

开发者 https://www.devze.com 2022-12-14 05:53 出处:网络
Can you refer me to some good reference how I can read writetoregistry via .net resources? I checked the site and couldn\'t find any g开发者_开发百科ood information.Check out the Registry class in th

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 g开发者_开发百科ood information.


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");
  ..
}


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

精彩评论

暂无评论...
验证码 换一张
取 消