Inserts an element into the
ListT at the specified index.
Namespace: System.Collections.GenericAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public void Insert(
int index,
T item
)
Parameters
- index
- Type: SystemInt32
The zero-based index at which item should be inserted. - item
- Type: T
The object to insert. The value can be null for reference types.
Implements
IListTInsert(Int32, T)Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | index is less than 0.-or-index is greater than Count. |
See Also