Table of Contents

Method ToArray

Namespace
Zyl.ExSpans
Assembly
ExSpans.Core.dll

ToArray()

Copies the contents of this span into a new array. The maxLength parameter uses the value of ArrayMaxLengthSafe (将此范围的内容复制到新建数组中. maxLength 参数使用 ArrayMaxLengthSafe 的值).

public T[] ToArray()

Returns

T[]

An array containing the data in the current span (包含当前跨度中数据的数组).

ToArray(int)

Copies the contents of this span into a new array. It has a maxLength parameters (将此跨度的内容复制到新建数组中. 它具有 maxLength 参数).

public T[] ToArray(int maxLength)

Parameters

maxLength int

The max length of array (数组的最大长度).

Returns

T[]

An array containing the data in the current span (包含当前跨度中数据的数组).

Exceptions

ArgumentOutOfRangeException

The maxLength parameter must be greater than 0