語言

IListContract<T>.GetItem(Int32) 方法

定義

回傳集合指定索引 IListContract<T> 的項目。

public:
 T GetItem(int index);
public T GetItem(int index);
abstract member GetItem : int -> 'T
Public Function GetItem (index As Integer) As T

參數

index
Int32

要取得的項目的零基指數。

傳回

T

該項目位於指定索引。

例外狀況

index 小於零。

-或-

index 等於或大於 的 GetCount()返回值。

備註

此 GetItem 方法不會移除指定索引處的項目。 要從收藏中移除項目 IListContract<T> ,請使用該 RemoveAt 方法。

適用於