StateManagedCollection.IList.Insert(Int32, Object) 方法

定義

將項目插入位於指定索引處的 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 超出集合範圍。

指定的 valuenull

備註

如果 index 為 -1, value 則會附加至集合的 StateManagedCollection 開頭。 如果 index 等於集合中的專案數, value 則會附加至集合結尾。

適用於

另請參閱