ImmutableArray<T>.IImmutableList<T>.Insert(Int32, T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回新的陣列,其中包含在指定位置插入的指定值。
virtual System::Collections::Immutable::IImmutableList<T> ^ System.Collections.Immutable.IImmutableList<T>.Insert(int index, T element) = System::Collections::Immutable::IImmutableList<T>::Insert;
System.Collections.Immutable.IImmutableList<T> IImmutableList<T>.Insert(int index, T element);
abstract member System.Collections.Immutable.IImmutableList<T>.Insert : int * 'T -> System.Collections.Immutable.IImmutableList<'T>
override this.System.Collections.Immutable.IImmutableList<T>.Insert : int * 'T -> System.Collections.Immutable.IImmutableList<'T>
Function Insert (index As Integer, element As T) As IImmutableList(Of T) Implements IImmutableList(Of T).Insert
參數
- index
- Int32
新項目應加入的陣列中以 0 為基礎的索引。
- element
- T
要插入在陣列起始的項目。
傳回
一個插入指定值的新陣列。
實作
備註
此成員為明確介面成員實作。 它只能在實 ImmutableArray<T> 例投射到 IImmutableList<T> 介面時使用。