ComponentSpace Registry Toolkit Class Library Reference

RegistryHelper.OpenKey Method (String, Boolean)

Open the key given its name.

[Visual Basic]
Overloads Public Shared Function OpenKey( _
   ByVal keyName As String, _
   ByVal writable As Boolean _
) As RegistryKey
[C#]
public static RegistryKey OpenKey(
   string keyName,
   bool writable
);

Parameters

keyName
The name of the key to open.
writable
true if the key is to be opened in read/write mode; false if the key is to be opened in read only mode.

Return Value

The key.

Remarks

For example, if the key name is "HKEY_LOCAL_MACHINE\Software\Test" then the Software\Test key under HKEY_LOCAL_MACHINE is opened.

Exceptions

Exception Type Condition
RegistryToolkitException Thrown when the registry operation fails.

See Also

RegistryHelper Class | ComponentSpace.RegistryToolkit Namespace | RegistryHelper.OpenKey Overload List