Editare

Partajați prin


IListContract<C>.RemoveAt(Int32) Method

Definition

Removes the element at the specified index.

public:
 void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

Parameters

index
Int32

The index of the element to remove.

Exceptions

index is less than zero.

-or-

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

Remarks

After you call RemoveAt, the elements that follow the removed element move to occupy the vacated spot. The indexes of the elements that are moved are also updated.

To determine whether an IListContract<C> is read-only, call the GetIsReadOnly method.

Applies to