Translate

> > How to Read/Write registry in C#?

How to Read/Write registry in C#?

Posted on Tuesday, January 17, 2012 | No Comments

using Microsoft.Win32;
 
public string GetRegistryValue(string key)
{
   return Convert.ToString(Registry.GetValue
                (@"HKEY_CURRENT_USER\Software\Yahoo\Common", "Sandy", "OLD"));
}

public void SetRegistryValue()
{
   Registry.SetValue(@"HKEY_CURRENT_USER\Software\Yahoo\Common", "Sandy", NEW");
} 

Leave a Reply

Powered by Blogger.