IListContract<C>.Insert(Int32, C) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts an element in the IListContract<C> at the specified index.
public:
void Insert(int index, C item);
public void Insert (int index, C item);
abstract member Insert : int * 'C -> unit
Public Sub Insert (index As Integer, item As C)
Parameters
- index
- Int32
The zero-based index at which to insert item
.
- item
- C
The IContract to insert in the IListContract<C>.
Exceptions
The IListContract<C> is read-only.
Remarks
After you call Insert, the elements that follow the insertion point move to accommodate the new element. The indexes of the elements that are moved are also updated. To replace an element at a specified index, use the SetItem method.
To determine whether an IListContract<C> is read-only, call the GetIsReadOnly method.