List<T>.RemoveAt Method

July 28, 2014

Removes the element at the specified index of the List<T>.

Namespace:  System.Collections.Generic
Assembly:  mscorlib (in mscorlib.dll)

public void RemoveAt(
	int index
)

Parameters

index
Type: System.Int32
The zero-based index of the element to remove.

Implements

IList<T>.RemoveAt(Int32)
IList.RemoveAt(Int32)

ExceptionCondition
ArgumentOutOfRangeException

index is less than 0.

-or-

index is equal to or greater than Count.

This method is an O(n) operation, where n is (Count - index).

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft