CircularListTInsert Method

Inserts an item to the CircularListT at the specified index.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public void Insert(
	int index,
	T item
)

Parameters

index  Int32
The zero-based index at which item should be inserted.
item  T
The object to insert into the CircularListT.

Implements

IListTInsert(Int32, T)

Remarks

Inserting an item at the first or last position are O(1) operations if no capacity increase is needed. Otherwise, insertion is an O(n) operation.

Exceptions

ArgumentOutOfRangeExceptionindex is not a valid index in the list.

See Also