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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
)

Parameters

index
Type: System.Int32

The zero-based index of the item to replace.

item
Type: T

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

Exception Condition
ArgumentOutOfRangeException

index is less than zero.

-or-

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
Show: