StateManagedCollection.OnInsertComplete(Int32, Object) 方法

定义

在派生类中替代时,在 IList.Insert(Int32, Object)IList.Add(Object) 方法向集合中添加项之后执行附加工作。When overridden in a derived class, performs additional work after the IList.Insert(Int32, Object) or IList.Add(Object) method adds an item to the collection.

protected:
 virtual void OnInsertComplete(int index, System::Object ^ value);
protected virtual void OnInsertComplete (int index, object value);
abstract member OnInsertComplete : int * obj -> unit
override this.OnInsertComplete : int * obj -> unit
Protected Overridable Sub OnInsertComplete (index As Integer, value As Object)

参数

index
Int32

从零开始的索引,在该位置由 IList.Insert(Int32, Object) 方法插入 valueThe zero-based index at which value is inserted by the IList.Insert(Int32, Object) method.

value
Object

插入到 StateManagedCollection 中的对象。The object inserted into the StateManagedCollection.

注解

StateManagedCollection使用或方法将项添加到集合后,派生自的集合可以重写 OnInsertComplete 方法,以执行任何其他工作 IList.Add IList.InsertCollections derived from StateManagedCollection can override the OnInsertComplete method to perform any additional work after an item is added to the collection using the IList.Add or IList.Insert method.

适用于

另请参阅