Skip to main content

Collection.Insert(Int32, ICollectionItem) Method

Inserts the specified item into the specified position within the collection.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v23.2.dll

NuGet Packages: DevExpress.Win, DevExpress.Win.Navigation

Declaration

public virtual object Insert(
    int index,
    ICollectionItem item
)

Parameters

Name Type Description
index Int32

An integer value specifying the zero-based index at which the item is added.

item ICollectionItem

An object supporting the ICollectionItem interface which is to be inserted to the collection.

Returns

Type Description
Object

An object representing the added item.

Remarks

If the index parameter is equal to the number of items, the specified item is added to the end of the collection. If the specified index is either negative or exceeds the number of items, an exception is raised.

See Also