Microsoft.Win32.RegistryKey.DeleteSubKeyTree C# (CSharp) Méthode

DeleteSubKeyTree() public méthode

public DeleteSubKeyTree ( string subkey ) : void
subkey string
Résultat void
        public void DeleteSubKeyTree(string subkey) { }
        public void DeleteSubKeyTree(string subkey, bool throwOnMissingSubKey) { }

Same methods

RegistryKey::DeleteSubKeyTree ( string subkey, bool throwOnMissingSubKey ) : void

Usage Example

 /// <summary>
 /// Helper function to recursively delete a sub-key (swallows errors in the
 /// case of the sub-key not existing
 /// </summary>
 /// <param name="root">Root to delete key from</param>
 /// <param name="subKey">Name of key to delete</param>
 public static void DeleteSubKeyTree(RegistryKey root, string subKey)
 {
     // delete the specified sub-key if if exists (swallow the error if the
     // sub-key does not exist)
     try { root.DeleteSubKeyTree(subKey); }
     catch (ArgumentException) { }
 }
All Usage Examples Of Microsoft.Win32.RegistryKey::DeleteSubKeyTree