Method Slice
Slice(nint)
Forms a slice out of the given Ex span, beginning at 'start' (从指定索引处开始的扩展跨度形成切片).
[FakeCLSCompliant(false)]
public ExSpan<T> Slice(nint start)
Parameters
start
nintThe zero-based index at which to begin this slice (从零开始的切片索引).
Returns
- ExSpan<T>
Returns the new Ex span (返回新的扩展跨度).
Exceptions
- ArgumentOutOfRangeException
Thrown when the specified
start
index is not in range (<0 or >Length).
Slice(nint, nint)
Forms a slice out of the given Ex span, beginning at 'start', of given length (从指定长度的指定索引处开始的当前扩展跨度形成切片).
[FakeCLSCompliant(false)]
public ExSpan<T> Slice(nint start, nint length)
Parameters
start
nintThe zero-based index at which to begin this slice (从零开始的切片索引).
length
nintThe desired length for the slice (exclusive) (切片所需的长度).
Returns
- ExSpan<T>
Returns the new Ex span (返回新的扩展跨度).
Exceptions
- ArgumentOutOfRangeException
Thrown when the specified
start
or end index is not in range (<0 or >Length).