I'm reading the value of a registry key:
Microsoft.Win32.RegistryKey key;
key = *someLongPathHere*;
and displaying the value to a label:
string a = (string)key.GetValue("");//a default value
label1.Text = a;
It displays:
{F241C880-6982-4CE5-8CF7-7085BA96DA5A}
which is mostly correct, except for the first underscore, which exists in the original value:
{_F241C880-6982-4CE5-8CF7-7085BA96DA5A}
Why does it happen? i.e the missing underscore?
Also, after reading the key, do I have to close the key or anything? How can I do it?