共用方式為


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 網域服務存放區中。

適用於

另請參閱