Indeed, as documentation says the return value of
Microsoft.Win32.RegistryKey.OpenSubKey
can be null:
http://msdn.microsoft.com/en-us/library/z9f66s0a.aspx[
^].
If the key not found, it should be null, all correct. Why it can be a problem? Note that
GetValue
can also be null, and it does not have to be a string type.
—SA