Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


ImmutableArray<T>.AsSpan Method

Definition

Overloads

AsSpan(Range)

Creates a span over the portion of the current ImmutableArray<T> based on the specified range.

AsSpan(Int32, Int32)

Creates a ReadOnlySpan<T> over the portion of the current ImmutableArray<T>, beginning at a specified position for a specified length.

AsSpan()

Creates a new read-only span over this immutable array.

AsSpan(Range)

Source:
ImmutableArray_1.netcoreapp.cs
Source:
ImmutableArray_1.netcoreapp.cs
Source:
ImmutableArray_1.netcoreapp.cs
Source:
ImmutableArray_1.netcoreapp.cs

Creates a span over the portion of the current ImmutableArray<T> based on the specified range.

C#
public ReadOnlySpan<T> AsSpan(Range range);

Parameters

range
Range

A range in the current ImmutableArray<T>.

Returns

A span representation of the ImmutableArray<T>.

Applies to

.NET 10 és más verziók
Termék Verziók
.NET 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10

AsSpan(Int32, Int32)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Creates a ReadOnlySpan<T> over the portion of the current ImmutableArray<T>, beginning at a specified position for a specified length.

C#
public ReadOnlySpan<T> AsSpan(int start, int length);

Parameters

start
Int32

The index at which to begin the span.

length
Int32

The number of items in the span.

Returns

The ReadOnlySpan<T> representation of the ImmutableArray<T>.

Applies to

.NET 10 és más verziók
Termék Verziók
.NET 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

AsSpan()

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Creates a new read-only span over this immutable array.

C#
public ReadOnlySpan<T> AsSpan();

Returns

The read-only span representation of this immutable array.

Applies to

.NET 10 és más verziók
Termék Verziók
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)