RegistryKey Methods
.NET Framework 4.5
The RegistryKey type exposes the following members.
| Name | Description | |
|---|---|---|
|
Close | Closes the key and flushes it to disk if its contents have been modified. |
|
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
|
CreateSubKey(String) | Creates a new subkey or opens an existing subkey for write access. |
|
CreateSubKey(String, RegistryKeyPermissionCheck) | Creates a new subkey or opens an existing subkey for write access, using the specified permission check option. |
|
CreateSubKey(String, RegistryKeyPermissionCheck, RegistryOptions) | Creates a subkey or opens a subkey for write access, using the specified permission check and registry options. |
|
CreateSubKey(String, RegistryKeyPermissionCheck, RegistrySecurity) | Creates a new subkey or opens an existing subkey for write access, using the specified permission check option and registry security. |
|
CreateSubKey(String, RegistryKeyPermissionCheck, RegistryOptions, RegistrySecurity) | Creates a subkey or opens a subkey for write access, using the specified permission check option, registry option, and registry security. |
|
DeleteSubKey(String) | Deletes the specified subkey. |
|
DeleteSubKey(String, Boolean) | Deletes the specified subkey, and specifies whether an exception is raised if the subkey is not found. |
|
DeleteSubKeyTree(String) | Deletes a subkey and any child subkeys recursively. |
|
DeleteSubKeyTree(String, Boolean) | Deletes the specified subkey and any child subkeys recursively, and specifies whether an exception is raised if the subkey is not found. |
|
DeleteValue(String) | Deletes the specified value from this key. |
|
DeleteValue(String, Boolean) | Deletes the specified value from this key, and specifies whether an exception is raised if the value is not found. |
|
Dispose | Releases all resources used by the current instance of the RegistryKey class. |
|
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
|
Flush | Writes all the attributes of the specified open registry key into the registry. |
|
FromHandle(SafeRegistryHandle) | Creates a registry key from a specified handle. |
|
FromHandle(SafeRegistryHandle, RegistryView) | Creates a registry key from a specified handle and registry view setting. |
|
GetAccessControl() | Returns the access control security for the current registry key. |
|
GetAccessControl(AccessControlSections) | Returns the specified sections of the access control security for the current registry key. |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
GetSubKeyNames | Retrieves an array of strings that contains all the subkey names. |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
GetValue(String) | Retrieves the value associated with the specified name. Returns null if the name/value pair does not exist in the registry. |
|
GetValue(String, Object) | Retrieves the value associated with the specified name. If the name is not found, returns the default value that you provide. |
|
GetValue(String, Object, RegistryValueOptions) | Retrieves the value associated with the specified name and retrieval options. If the name is not found, returns the default value that you provide. |
|
GetValueKind | Retrieves the registry data type of the value associated with the specified name. |
|
GetValueNames | Retrieves an array of strings that contains all the value names associated with this key. |
|
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
OpenBaseKey | Opens a new RegistryKey that represents the requested key on the local machine with the specified view. |
|
OpenRemoteBaseKey(RegistryHive, String) | Opens a new RegistryKey that represents the requested key on a remote machine. |
|
OpenRemoteBaseKey(RegistryHive, String, RegistryView) | Opens a new registry key that represents the requested key on a remote machine with the specified view. |
|
OpenSubKey(String) | Retrieves a subkey as read-only. |
|
OpenSubKey(String, RegistryKeyPermissionCheck) | Retrieves the specified subkey for read or read/write access. |
|
OpenSubKey(String, Boolean) | Retrieves a specified subkey, and specifies whether write access is to be applied to the key. |
|
OpenSubKey(String, RegistryKeyPermissionCheck, RegistryRights) | Retrieves the specified subkey for read or read/write access, requesting the specified access rights. |
|
SetAccessControl | Applies Windows access control security to an existing registry key. |
|
SetValue(String, Object) | Sets the specified name/value pair. |
|
SetValue(String, Object, RegistryValueKind) | Sets the value of a name/value pair in the registry key, using the specified registry data type. |
|
ToString | Retrieves a string representation of this key. (Overrides Object.ToString().) |