ReadOnlySpan<T>.Implicit Operator

Definition

Overloads

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

Defines an implicit conversion of an ArraySegment<T> to a ReadOnlySpan<T>.

Implicit(T[] to ReadOnlySpan<T>)

Defines an implicit conversion of an array to a ReadOnlySpan<T>.

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

Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs

Defines an implicit conversion of an ArraySegment<T> to a ReadOnlySpan<T>.

C#
public static implicit operator ReadOnlySpan<T>(ArraySegment<T> segment);

Parameters

segment
ArraySegment<T>

The array segment to be converted to a ReadOnlySpan<T>.

Returns

A read-only span that corresponds to the array segment.

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Implicit(T[] to ReadOnlySpan<T>)

Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs

Defines an implicit conversion of an array to a ReadOnlySpan<T>.

C#
public static implicit operator ReadOnlySpan<T>(T[]? array);
C#
public static implicit operator ReadOnlySpan<T>(T[] array);

Parameters

array
T[]

The array to convert to a ReadOnlySpan<T>.

Returns

The read-only span that corresponds to array.

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1