BindingList(Of T).SetItem Method (Int32, T)


Replaces the item at the specified index with the specified item.

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

Protected Overrides Sub SetItem (
	index As Integer,
	item As T


Type: System.Int32

The zero-based index of the item to replace.

Type: T

The new value for the item at the specified index. The value can be null for reference types.

Exception Condition

index is less than zero.


index is greater than Count.

After the item is set, SetItem raises a ListChanged event of type ItemChanged indicating the index of the item that was set.

.NET Framework
Available since 2.0
Return to top