NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RegistryKey.DeleteSubKeyTree

Recursively deletes a subkey and any child subkeys. The string subKey is not case sensitive.

[Visual Basic]
Public Sub DeleteSubKeyTree( _
   ByVal subkey As String _
)
[C#]
public void DeleteSubKeyTree(
   string subkey
);
[C++]
public: void DeleteSubKeyTree(
   String* subkey
);
[JScript]
public function DeleteSubKeyTree(
   subkey : String
);

Parameters

subkey
Subkey to delete.

Exceptions

Exception Type Condition
InvalidArgumentException if deletion of a root hive is attempted.
ArgumentException if subkey does not match a valid registry subkey.
ArgumentNullException if subkey is null.
SecurityException if user does not have RegistryPermission.SetInclude(delete, currentKey) access.

See Also

RegistryKey Class | RegistryKey Members | Microsoft.Win32 Namespace