Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IList.RemoveAt Method

When implemented by a class, removes the IList item at the specified index.

[Visual Basic]
Sub RemoveAt( _
   ByVal index As Integer _
)
[C#]
void RemoveAt(
   int index
);
[C++]
void RemoveAt(
   int index
);
[JScript]
function RemoveAt(
   index : int
);

Parameters

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

Exceptions

Exception Type Condition
ArgumentOutOfRangeException index is not a valid index in the IList.
NotSupportedException The IList is read-only.

-or-

The IList has a fixed size.

Remarks

In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hashtable.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IList Interface | IList Members | System.Collections Namespace

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft