Muokkaa

Jaa


IListContract<C>.GetItem(Int32) Method

Definition

Returns the element at the specified index.

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

Parameters

index
Int32

The zero-based index of the element to get.

Returns

C

The element at the specified index.

Exceptions

index is less than zero.

-or-

index is equal to or greater than the return value of GetCount().

Remarks

The GetItem method does not remove the element at the specified index. To remove an element from the IListContract<C>, use the RemoveAt method.

Applies to