共用方式為


ActiveDirectoryRoleCollection.Contains(ActiveDirectoryRole) 方法

定義

判斷指定的 ActiveDirectoryRole 物件是否在這個集合中。

public:
 bool Contains(System::DirectoryServices::ActiveDirectory::ActiveDirectoryRole role);
public bool Contains (System.DirectoryServices.ActiveDirectory.ActiveDirectoryRole role);
member this.Contains : System.DirectoryServices.ActiveDirectory.ActiveDirectoryRole -> bool
Public Function Contains (role As ActiveDirectoryRole) As Boolean

參數

role
ActiveDirectoryRole

要在此集合中搜尋的 ActiveDirectoryRole 物件。

傳回

如果 ActiveDirectoryRole 物件在此集合中,則為 true,否則為 false

例外狀況

rolenull

適用於

另請參閱