Table of Contents

Method LastSlice

Namespace
Zyl.ExSpans
Assembly
ExSpans.Core.dll

LastSlice(nint)

Forms a slice out of the given read-only Ex span, last beginning at 'TSize' (从尾部指定索引处的只读扩展跨度形成切片).

[FakeCLSCompliant(false)]
public ReadOnlyExSpan<T> LastSlice(nint end)

Parameters

end nint

The zero-based index at which to begin this slice (从零开始的切片尾部索引).

Returns

ReadOnlyExSpan<T>

Returns the new read-only Ex span (返回新的只读扩展跨度).

Exceptions

ArgumentOutOfRangeException

Thrown when the specified end index is not in range (<0 or >Length).

LastSlice(nint, nint)

Forms a slice out of the given read-only Ex span, last beginning at 'end', of given length (从尾部指定长度的指定索引处开始的当前只读扩展跨度形成切片)

[FakeCLSCompliant(false)]
public ReadOnlyExSpan<T> LastSlice(nint end, nint length)

Parameters

end nint

The zero-based index at which to begin this slice (从零开始的切片尾部索引).

length nint

The desired length for the slice (exclusive) (切片所需的长度).

Returns

ReadOnlyExSpan<T>

Returns the new read-only Ex span (返回新的只读扩展跨度).

Exceptions

ArgumentOutOfRangeException

Thrown when the specified end or end index is not in range (<0 or >Length).