StateManagedCollection.OnInsert(Int32, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,在或IList.Insert(Int32, Object)方法向集合中添加项之前IList.Add(Object)执行其他工作。
protected:
virtual void OnInsert(int index, System::Object ^ value);
protected virtual void OnInsert(int index, object value);
abstract member OnInsert : int * obj -> unit
override this.OnInsert : int * obj -> unit
Protected Overridable Sub OnInsert (index As Integer, value As Object)
参数
- index
- Int32
方法应插入的 value 从零开始的 IList.Insert(Int32, Object) 索引。
- value
- Object
要插入到 . 中的 StateManagedCollection对象。
注解
派生自StateManagedCollection的集合可以在使用OnInsert或IList.Add方法将项添加到集合之前重写IList.Insert该方法以执行任何其他工作。