ActiveDirectoryRoleCollection.Contains(ActiveDirectoryRole) 方法
定义
确定指定的 ActiveDirectoryRole 对象是否在此集合中。Determines if the specified ActiveDirectoryRole object is in this collection.
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 对象。The ActiveDirectoryRole object to search for in this collection.
返回
如果 ActiveDirectoryRole 对象处于此集合中,则为 true;否则为 false。true if the ActiveDirectoryRole object is in this collection; otherwise, false.
例外
role 为 null。role is null.