Table of Contents

Method AsSpan

Namespace
Zyl.ExSpans
Assembly
ExSpans.Core.dll

AsSpan<T>(ExSpan<T>)

An conversion of a ExSpan<T> to a Span<T>. The length will saturating limited to the maximum length it supports (ExSpan<T>Span<T> 的转换. 长度会饱和限制为它所支持的最大长度).

public static Span<T> AsSpan<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>, nint)

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

[FakeCLSCompliant(false)]
public static Span<T> AsSpan<T>(this ExSpan<T> span, nint start)

Parameters

span ExSpan<T>

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

start nint

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

Returns

Span<T>

a Span<T>

Type Parameters

T

The element type (元素的类型).

See Also

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

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

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

Parameters

span ExSpan<T>

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

start 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