>I look the manual, it say "To get an instance of a
>RegistryKey, use the static member OpenSubKey". But
>I find OpenSubKey method is not static. How can I
>create an instanse of a RegistryKey?
The Registry class has static members representing the different root
hives (HKLM, HKCU and so on). Call OpenSubKey on one of those, for
example
RegistryKey key =
Registry.CurrentUser.OpenSubKey("Software\\YourCompany");
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.