Method AsReadOnlySpan
AsReadOnlySpan<T>(ReadOnlyExSpan<T>)
An conversion of a ReadOnlyExSpan<T> to a ReadOnlySpan<T>. The length will saturating limited to the maximum length it supports (ReadOnlyExSpan<T> 到 ReadOnlySpan<T> 的转换. 长度会饱和限制为它所支持的最大长度).
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ReadOnlyExSpan<T> span)
Parameters
span
ReadOnlyExSpan<T>The object to convert (要转换的对象).
Returns
Type Parameters
T
The element type (元素的类型).
- See Also
-
LastAsReadOnlySpan<T>(ReadOnlyExSpan<T>)
AsReadOnlySpan<T>(ReadOnlyExSpan<T>, nint)
An conversion of a ReadOnlyExSpan<T> to a ReadOnlySpan<T>, beginning at 'start'. The length will saturating limited to the maximum length it supports (ReadOnlyExSpan<T> 到 ReadOnlySpan<T> 的转换, 从指定索引处开始. 长度会饱和限制为它所支持的最大长度).
[FakeCLSCompliant(false)]
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ReadOnlyExSpan<T> span, nint start)
Parameters
span
ReadOnlyExSpan<T>The object to convert (要转换的对象).
start
nintThe zero-based index at which to begin this slice (从零开始的切片索引).
Returns
Type Parameters
T
The element type (元素的类型).
- See Also
AsReadOnlySpan<T>(ReadOnlyExSpan<T>, nint, int)
An conversion of a ReadOnlyExSpan<T> to a ReadOnlySpan<T>, beginning at 'start', of given length (ReadOnlyExSpan<T> 到 ReadOnlySpan<T> 的转换, 从指定索引处开始, 且使用指定长度).
[FakeCLSCompliant(false)]
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ReadOnlyExSpan<T> span, nint start, int length)
Parameters
span
ReadOnlyExSpan<T>The object to convert (要转换的对象).
start
nintThe zero-based index at which to begin this slice (从零开始的切片索引).
length
int
Returns
Type Parameters
T
The element type (元素的类型).
- See Also