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

定義

將項目插入清單的指定索引處。

 virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert (int index, object value);
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
Object

要插入清單中的項目。

實作

備註

如果 index 等於清單中的專案數,則會將 附加至結尾。

在相鄰元素的集合中,例如清單,接在移除的元素之後的元素會向上移動以佔用空出的位置。 如果集合具有索引,則移動之項目的索引也會更新。

適用於