Table of Contents

Method LastAsSpan

Namespace
Zyl.ExSpans
Assembly
ExSpans.Core.dll

LastAsSpan<T>(ExSpan<T>)

An conversion of a ExSpan<T> to a Span<T>, last beginning at end. The length will saturating limited to the maximum length it supports (ExSpan<T>Span<T> 的转换, 从尾部索引处开始. 长度会饱和限制为它所支持的最大长度).

public static Span<T> LastAsSpan<T>(this ExSpan<T> span)

Parameters

span ExSpan<T>

The object to convert (要转换的对象).

Returns

Span<T>

a Span<T>

Type Parameters

T

The element type (元素的类型).

See Also
AsSpan<T>(ExSpan<T>)

LastAsSpan<T>(ExSpan<T>, nint, int)

An conversion of a ExSpan<T> to a Span<T>, last beginning at 'end', of given length (ExSpan<T>Span<T> 的转换, 从尾部指定索引处开始, 且使用指定长度).

[FakeCLSCompliant(false)]
public static Span<T> LastAsSpan<T>(this ExSpan<T> span, nint end, int length)

Parameters

span ExSpan<T>

The object to convert (要转换的对象).

end nint

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

length int

Returns

Span<T>

a Span<T>

Type Parameters

T

The element type (元素的类型).

See Also