private void AssertNotMarkedForDeletion () { if (IsMarkedForDeletion) throw RegistryKey.CreateMarkedForDeletionException (); }