Span<T>.Implicit Span<T>.Implicit Span<T>.Implicit Span<T>.Implicit Operator

定义

重载

Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>)

定义 ArraySegment<T>Span<T> 的隐式转换。Defines an implicit conversion of an ArraySegment<T> to a Span<T>.

Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>)

定义 Span<T>ReadOnlySpan<T> 的隐式转换。Defines an implicit conversion of a Span<T> to a ReadOnlySpan<T>.

Implicit(T[] to Span<T>) Implicit(T[] to Span<T>) Implicit(T[] to Span<T>) Implicit(T[] to Span<T>)

定义数组到 Span<T> 的隐式转换。Defines an implicit conversion of an array to a Span<T>.

Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>) Implicit(ArraySegment<T> to Span<T>)

定义 ArraySegment<T>Span<T> 的隐式转换。Defines an implicit conversion of an ArraySegment<T> to a Span<T>.

public:
 static operator Span<T>(ArraySegment<T> segment);
public static implicit operator Span<T> (ArraySegment<T> segment);
static member op_Implicit : ArraySegment<'T> -> Span<'T>
Public Shared Widening Operator CType (segment As ArraySegment(Of T)) As Span(Of T)

参数

segment
ArraySegment<T> ArraySegment<T> ArraySegment<T> ArraySegment<T>

要转换为 Span<T> 的数组段。The array segment to be converted to a Span<T>.

返回

与数组段相对应的范围。A span that corresponds to the array segment.

Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>) Implicit(Span<T> to ReadOnlySpan<T>)

定义 Span<T>ReadOnlySpan<T> 的隐式转换。Defines an implicit conversion of a Span<T> to a ReadOnlySpan<T>.

public:
 static operator ReadOnlySpan<T>(Span<T> span);
public static implicit operator ReadOnlySpan<T> (Span<T> span);
static member op_Implicit : Span<'T> -> ReadOnlySpan<'T>
Public Shared Widening Operator CType (span As Span(Of T)) As ReadOnlySpan(Of T)

参数

span
Span<T> Span<T> Span<T> Span<T>

要转换为 ReadOnlySpan<T> 的对象。The object to convert to a ReadOnlySpan<T>.

返回

与当前实例对应的只读范围。A read-only span that corresponds to the current instance.

Implicit(T[] to Span<T>) Implicit(T[] to Span<T>) Implicit(T[] to Span<T>) Implicit(T[] to Span<T>)

定义数组到 Span<T> 的隐式转换。Defines an implicit conversion of an array to a Span<T>.

public:
 static operator Span<T>(cli::array <T> ^ array);
public static implicit operator Span<T> (T[] array);
static member op_Implicit : 'T[] -> Span<'T>
Public Shared Widening Operator CType (array As T()) As Span(Of T)

参数

array
T[]

要转换为 Span<T> 的数组。The array to convert to a Span<T>.

返回

array 对应的范围。The span that corresponds to array.

适用于