Exemplo n.º 1
0
 public static void Delete(this RegistryKey key)
 {
     using (var parentKey = key.GetParent(true))
     {
         var keyName = key.Name.Split('\\').Last();
         parentKey.DeleteSubKeyTree(keyName);
     }
 }
Exemplo n.º 2
0
 public static RegistryKey GetParent(this RegistryKey key)
 {
     return(key.GetParent(false));
 }