Condividi tramite


PSDataCollection<T>.Insert(Int32, T) Method

Definition

Inserts an item to the buffer at the specified index.

public:
 virtual void Insert(int index, T item);
public void Insert (int index, T item);
abstract member Insert : int * 'T -> unit
override this.Insert : int * 'T -> unit
Public Sub Insert (index As Integer, item As T)

Parameters

index
Int32

The zero-based index at which item should be inserted.

item
T

The object to insert into the buffer.

Implements

Exceptions

Objects cannot be added to a closed buffer. Make sure the buffer is open for Add and Insert operations to succeed.

The index specified is less than zero or greater than Count.

Applies to