BindingList<T>.InsertItem Method (Int32, T)


Inserts the specified item in the list at the specified index.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

protected override void InsertItem(
	int index,
	T item


Type: System.Int32

The zero-based index where the item is to be inserted.

Type: T

The item to insert in the list.

InsertItem performs the following operations:

  • Calls EndNew to commit any uncommitted items added through the AddingNew event.

  • Inserts the item at the specified index

  • Raises a ListChanged event of type ItemAdded indicating the index of the item that was inserted.

.NET Framework
Available since 2.0
Return to top