DirectoryServerCollection.Remove(DirectoryServer) 方法

定义

移除此集合中与指定的 DirectoryServer 对象相同的对象的第一个匹配项。Removes the first occurrence of an object in this collection that is identical to the specified DirectoryServer object.

public:
 void Remove(System::DirectoryServices::ActiveDirectory::DirectoryServer ^ server);
public void Remove (System.DirectoryServices.ActiveDirectory.DirectoryServer server);
member this.Remove : System.DirectoryServices.ActiveDirectory.DirectoryServer -> unit
Public Sub Remove (server As DirectoryServer)

参数

server
DirectoryServer

要从此集合中移除的 DirectoryServer 对象。The DirectoryServer object to remove from this collection.

例外

对基础目录服务的调用导致了错误。A call to the underlying directory service resulted in an error.

集合中不存在该对象。The object does not exist in the collection.

servernullserver is null.

尚未将 DirectoryServer 对象保存到 Active Directory 域服务存储区中。The DirectoryServer object has not yet been saved in the Active Directory Domain Services store.

适用于

另请参阅