BaseListControlObjectCollectionInsert Method

Insert a value into the collection at the specified index

Definition

Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
public void Insert(
	int index,
	Object value
)

Parameters

index  Int32
The index at which to insert the item
value  Object
The value to insert

Implements

IListInsert(Int32, Object)

Remarks

If the collection is sorted, the value is added to the collection and the collection is resorted. The value may or may not end up at the requested index.

Exceptions

ArgumentNullExceptionThis is thrown if the value is null.
ArgumentOutOfRangeExceptionThis is thrown if the index value is not within the bounds of the collection.
ArgumentExceptionThis is thrown if an attempt is made to add a value to the collection when a data source is in use.

See Also