Method LastSlice
LastSlice(nint)
Forms a slice out of the given Ex span, last beginning at 'TSize' (从尾部指定索引处的扩展跨度形成切片).
[FakeCLSCompliant(false)]
public ExSpan<T> LastSlice(nint end)
Parameters
end
nintThe zero-based index at which to begin this slice (从零开始的切片尾部索引).
Returns
- ExSpan<T>
Returns the new 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 Ex span, last beginning at 'end', of given length (从尾部指定长度的指定索引处开始的当前扩展跨度形成切片)
[FakeCLSCompliant(false)]
public ExSpan<T> LastSlice(nint end, nint length)
Parameters
end
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
end
or end index is not in range (<0 or >Length).