This documentation is archived and is not being maintained.

RegistryKey Members

RegistryKey overview

Public Properties

public propertyName Retrieves the name of the key.
public propertySubKeyCount Retrieves the count of subkeys at the base level, for the current key.
public propertyValueCount Retrieves the count of values in the key.

Public Methods

public methodClose Closes the key and flushes it to disk if the contents have been modified.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodCreateSubKey Creates a new subkey or opens an existing subkey. The string subKey is not case-sensitive.
public methodDeleteSubKey Overloaded. Deletes the specified subkey. The string subKey is not case-sensitive.
public methodDeleteSubKeyTree Deletes a subkey and any child subkeys recursively. The string subKey is not case-sensitive.
public methodDeleteValue Overloaded. Deletes the specified value from this key.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodFlush Writes all the attributes of the specified open registry key into the registry.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetSubKeyNames Retrieves an array of strings that contains all the subkey names.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodGetValue Overloaded. Retrieves the specified value.
public methodGetValueNames Retrieves an array of strings that contains all the value names associated with this key.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodstatic (Shared in Visual Basic)OpenRemoteBaseKey Opens a new RegistryKey that represents the requested key on a foreign machine.
public methodOpenSubKey Overloaded. Retrieves a specified subkey, with the write access as specified.
public methodSetValue Sets the specified value.
public methodToString Overridden. Retrieves a string representation of this key.

Protected Methods

protected methodFinalize Overridden. Closes the key and flushes it to disk if the contents have been modified.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

RegistryKey Class | Microsoft.Win32 Namespace

Show: