SearchResultCollection.Item[Int32] 属性

定义

获取位于此集合中指定索引处的 SearchResult 对象。Gets the SearchResult object that is located at a specified index in this collection.

public:
 property System::DirectoryServices::SearchResult ^ default[int] { System::DirectoryServices::SearchResult ^ get(int index); };
public System.DirectoryServices.SearchResult this[int index] { get; }
member this.Item(int) : System.DirectoryServices.SearchResult
Default Public ReadOnly Property Item(index As Integer) As SearchResult

参数

index
Int32

要检索的 SearchResult 对象的从零开始的索引。The zero-based index of the SearchResult object to retrieve.

属性值

SearchResult

位于指定索引处的 SearchResult 对象。The SearchResult object that is located at the specified index.

注解

在 C# 中,此属性是 SearchResultCollection 类的索引器。In C#, this property is the indexer for the SearchResultCollection class.

在 JScript 中,您可以使用某个类型定义的默认索引属性,但不能显式定义自己的属性。In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. 但是,在类上指定 expando 特性将自动提供其类型为 Object、索引类型为的默认索引属性 StringHowever, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and with an index type of String.

适用于