StateManagedCollection.IList.Insert(Int32, Object) 方法
定義
將項目插入位於指定索引處的 StateManagedCollection 集合中。Inserts an item into the StateManagedCollection collection at the specified index.
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
插入以零為起始的索引。The zero-based index at which value
should be inserted.
- value
- Object
要插入 StateManagedCollection 的物件。The object to insert into the StateManagedCollection.
實作
例外狀況
所指定的 index
超出集合範圍。The specified index
is out of range of the collection.
StateManagedCollection 為唯讀。The StateManagedCollection is read-only.
指定的 value
為 null
。The specified value
is null
.
備註
如果 index
是-1, value
會附加至集合的開頭 StateManagedCollection 。If index
is -1, value
is appended to the beginning of the StateManagedCollection collection. 如果 index
等於集合中的專案數, value
會附加至集合的結尾。If index
equals the number of items in the collection, value
is appended to the end of the collection.