Share via


ObservableCollection<T>.InsertItem(Int32, T) 方法

定義

將項目插入至索引中的指定索引處。

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

參數

index
Int32

應在 item 插入以零為起始的索引。

item
T

要插入的物件。

備註

基類會在專案加入至集合時呼叫這個方法。 這個實作 CollectionChanged 會引發 事件。

如需詳細資訊,請參閱 InsertItem 基類的 Collection<T> 方法。

適用於