M_Cyjb_Collections_PooledList_1_InsertSpan - CYJB/Cyjb GitHub Wiki

PooledList(T).InsertSpan 方法

在当前列表的指定索引处插入指定长度的元素,并返回相应的切片用于初始化。

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

语法

C#

public Span<T> InsertSpan(
	int index,
	int count
)

参数

 

index
Type: System.Int32
从零开始的索引,应在该位置插入元素。
count
Type: System.Int32
要插入的元素个数。

返回值

Type: Span(T)
被插入元素的切片。

Exceptions

 

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

参见

Reference

PooledList(T) 类
Cyjb.Collections 命名空间

⚠️ **GitHub.com Fallback** ⚠️