BindingList<T>.SetItem(Int32, T) 方法

定義

將位於指定索引處的專案取代為指定的專案。

protected:
 override void SetItem(int index, T item);
protected override void SetItem(int index, T item);
override this.SetItem : int * 'T -> unit
Protected Overrides Sub SetItem (index As Integer, item As T)

參數

index
Int32

要替換項目的零基索引。

item
T

該項目在指定索引處的新值。 值可以是 null 參考型別。

例外狀況

index 小於零。

-或-

index 大於 Count

備註

項目設定完成後, SetItem 會觸發 ListChanged 一個 ItemChanged 事件,表示該項目的索引。

適用於

另請參閱