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!

DirectoryEntryCollection.Remove

Deletes a child DirectoryEntry from this collection.

[Visual Basic]
Public Sub Remove( _
   ByVal entry As DirectoryEntry _
)
[C#]
public void Remove(
   DirectoryEntry entry
);
[C++]
public: void Remove(
   DirectoryEntry* entry
);
[JScript]
public function Remove(
   entry : DirectoryEntry
);

Parameters

entry
The DirectoryEntry to delete.

Exceptions

Exception Type Condition
InvalidOperationException The node you are trying to remove is not a child of the given DirectoryEntry.
COMException The given DirectoryEntry does not exist. The associated error code is E_ADS_OBJECT_UNKNOWN.

Remarks

The entry must be an empty container or a non-container. To delete an entry and all its children, use the DeleteTree method from DirectoryEntry.

See Also

DirectoryEntryCollection Class | DirectoryEntryCollection Members | System.DirectoryServices Namespace