System.Collections.Generic.List<T>.RemoveAt Method
Removes the item at the specified index of the list.

Syntax

public void RemoveAt (int index)

Parameters

index
The zero-based index of the item to remove.

Exceptions

TypeReason
ArgumentOutOfRangeException

index is less than 0.

-or-

index is equal to or greater than stem.Collections.Generic.List<T>.Count.

Remarks

The item is removed and all the elements following it in the List have their indexes reduced by 1.

This method is an O(n) operation, where n is stem.Collections.Generic.List<T>.Count.

Requirements

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0