RemoveElement() публичный Метод

Removes a specific element.
public RemoveElement ( WellKnownElement id ) : void
id WellKnownElement The element to remove.
Результат void
        public void RemoveElement_NonExistent()
        {
            RegistryHive hive = RegistryHive.Create(new MemoryStream());
            Store        s    = Store.Initialize(hive.Root);
            BcdObject    obj  = s.CreateInherit(InheritType.AnyObject);

            obj.RemoveElement(WellKnownElement.LibraryApplicationPath);
        }
        public void RemoveElement()
        {
            RegistryHive hive = RegistryHive.Create(new MemoryStream());
            Store        s    = Store.Initialize(hive.Root);
            BcdObject    obj  = s.CreateInherit(InheritType.AnyObject);

            obj.AddElement(WellKnownElement.LibraryApplicationPath, ElementValue.ForString(@"\a\path\to\nowhere"));
            obj.RemoveElement(WellKnownElement.LibraryApplicationPath);

            Assert.IsFalse(obj.HasElement(WellKnownElement.LibraryApplicationPath));
        }