Share via


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 _
)
public void Insert(
    int index,
    T item
)
public:
virtual void Insert(
    int index, 
    T item
) sealed
function insert(index, item);

Parameters

  • index
    Type: Int32
    The position where the element is added.
  • item
    Type: T
    The object to add to the collection.

Implements

IListInsert(Int32, UTP)

Exceptions

Exception Condition
ArgumentNullException Thrown if trying to insert null.
InvalidOperationException Thrown if the item is already in the collection.

See Also

BaseCollection<(Of <(T>)>) Class

Microsoft.Rtc.Workflow.Utilities Namespace