StateManagedCollection.IList.Insert(Int32, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在指定的索引處插入一個項目。StateManagedCollection
virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert(int index, object value);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, value As Object) Implements IList.Insert
參數
- index
- Int32
應插入的以零為基礎的索引 value 。
- value
- Object
要插入 StateManagedCollection的物件。
實作
例外狀況
指定的 index 不在集合範圍內。
指定的 value 為 null。
備註
若 index 為 -1,則 value 附加於集合的 StateManagedCollection 開頭。 若 index 等於集合中項目數量, value 則會附加在集合的末尾。