BindingList<T>.SetItem(Int32, T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將位於指定索引處的專案取代為指定的專案。
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 參考型別。
例外狀況
備註
項目設定完成後, SetItem 會觸發 ListChanged 一個 ItemChanged 事件,表示該項目的索引。