BoundsCheckableList1.Insert

BoundsCheckableList<T>.Insert 方法

在指定索引处将元素插入到 System.Collections.Generic.List 中。

public void Insert(int index, T item)
参数类型描述
indexInt32应插入项的零基索引。
itemT要插入的对象。对于引用类型,值可以为 null。

异常

异常条件
ArgumentOutOfRangeExceptionindex 小于 0。 -或- index 大于 Count。

另请参见