CollectionTInsertItem Method |
Inserts an element into the
CollectionT at the specified index.
Namespace: System.Collections.ObjectModelAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax protected virtual void InsertItem(
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.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | index is less than zero.-or-index is greater than Count. |
See Also