Array.IList.Insert(Int32, Object) Method

Definition

將項目插入 IList 中指定的索引位置。Inserts an item to the IList 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

Parameters

index
Int32

應該插入 value 處的索引。The index at which value should be inserted.

value
Object

要插入的物件。The object to insert.

Implements

Exceptions

index 不是 IList 中的有效索引。index is not a valid index in the IList.

IList 是唯讀的。The IList is read-only.

-或--or- IList 具有固定的大小。The IList has a fixed size.

IList 中的 value 是 null 參考。value is null reference in the IList.

Remarks

這個成員是明確的介面成員實作。This member is an explicit interface member implementation. 只有在 Array 執行個體轉換成 IList 介面時,才能使用這個成員。It can be used only when the Array instance is cast to an IList interface.

Applies to