ActiveDirectorySiteCollection.Contains(ActiveDirectorySite) 方法

定义

确定指定的 ActiveDirectorySite 对象是否在此集合中。

public:
 bool Contains(System::DirectoryServices::ActiveDirectory::ActiveDirectorySite ^ site);
public bool Contains (System.DirectoryServices.ActiveDirectory.ActiveDirectorySite site);
member this.Contains : System.DirectoryServices.ActiveDirectory.ActiveDirectorySite -> bool
Public Function Contains (site As ActiveDirectorySite) As Boolean

参数

site
ActiveDirectorySite

要在此集合中搜索的 ActiveDirectorySite 对象。

返回

如果 ActiveDirectorySite 对象处于此集合中,则为 true;否则为 false

例外

调用基础目录服务导致错误。

sitenull

尚未将 ActiveDirectorySite 对象保存到 Active Directory 域服务存储区中。

适用于

另请参阅