Skip to content

M_Cyjb_Collections_ObjectModel_ListBase_1_Insert

CYJB edited this page Mar 20, 2024 · 13 revisions

ListBase(T).Insert 方法

将元素插入当前列表的指定索引处。

Namespace: Cyjb.Collections.ObjectModel
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public void Insert(
	int index,
	T item
)

参数

 

index
Type: System.Int32
从零开始的索引,应在该位置插入 item
item
Type: T
要插入到当前列表中的对象。

实现

IList(T).Insert(Int32, T)

Exceptions

 

异常 条件
ArgumentOutOfRangeException index 不是当前列表中的有效索引。

参见

Reference

ListBase(T) 类
Cyjb.Collections.ObjectModel 命名空间

Clone this wiki locally