ImmutableArray<T>.Insert(Int32, T) 方法

定义

返回一个新数组,其中包含在指定位置插入的指定值。

public:
 System::Collections::Immutable::ImmutableArray<T> Insert(int index, T item);
public System.Collections.Immutable.ImmutableArray<T> Insert(int index, T item);
member this.Insert : int * 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Insert (index As Integer, item As T) As ImmutableArray(Of T)

参数

index
Int32

应在其中添加新项的数组中基于 0 的索引。

item
T

要插入到数组开头的项。

返回

在指定索引处插入项的新数组。

适用于