BaseCollection<T>.Insert Method
Inserts an element at a specific position in the collection.
Namespace: Microsoft.Rtc.Workflow.Utilities
Assembly: Microsoft.Rtc.Workflow (in Microsoft.Rtc.Workflow.dll)
Syntax
'Declaration
Public Sub Insert ( _
index As Integer, _
item As T _
)
'Usage
Dim instance As BaseCollection
Dim index As Integer
Dim item As T
instance.Insert(index, item)
public void Insert(
int index,
T item
)
Parameters
- index
Type: System.Int32
The position where the element is added.
- item
Type: T
The object to add to the collection.
Implements
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if trying to insert null. |
InvalidOperationException | Thrown if the item is already in the collection. |