ActiveDirectorySchemaPropertyCollection.IndexOf(ActiveDirectorySchemaProperty) 方法

定义

返回在此集合中指定的 ActiveDirectorySchemaProperty 对象的第一个匹配项。Returns the first occurrence of the specified ActiveDirectorySchemaProperty object in this collection.

public:
 int IndexOf(System::DirectoryServices::ActiveDirectory::ActiveDirectorySchemaProperty ^ schemaProperty);
public int IndexOf (System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaProperty schemaProperty);
member this.IndexOf : System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaProperty -> int
Public Function IndexOf (schemaProperty As ActiveDirectorySchemaProperty) As Integer

参数

schemaProperty
ActiveDirectorySchemaProperty

要在此集合中搜索的 ActiveDirectorySchemaProperty 对象。The ActiveDirectorySchemaProperty object to search for in this collection.

返回

Int32

第一个匹配对象的从零开始的索引。The zero-based index of the first matching object. 如果此集合的任何成员均不同于 ActiveDirectorySchemaProperty 对象,则返回 -1。Returns -1 if no member of this collection is identical to the ActiveDirectorySchemaProperty object.

例外

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

schemaPropertynullschemaProperty is null.

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

适用于

另请参阅