Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
virtual void InsertItem(
	int index,
	T item
) override

Parameters

index
Type: System::Int32

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

item
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
Show:
© 2017 Microsoft