You can check below link for more info.
public string Read(string KeyName)
{
RegistryKey rk = baseRegistryKey ;
RegistryKey sk1 = rk.OpenSubKey(subKey);
if ( sk1 == null )
{
return null;
}
else
{
try
{
return (string)sk1.GetValue(KeyName.ToUpper());
}
catch (Exception e)
{
ShowErrorMessage(e, "Reading registry " + KeyName.ToUpper());
return null;
}
}
}
For more info:
Read, write and delete from registry with C#[
^]
I hope this will help to you.