Прочетете на английски Редактиране

Споделяне чрез


Memory<T>.Span Property

Definition

Returns a span from the current instance.

C#
public Span<T> Span { get; }

Property Value

A span created from the current Memory<T> object.

Remarks

Although it doesn't involve copying, it's costly to access this property. Instead of accessing this property multiple times, it's better to assign its result to a variable (if possible).

Applies to

Продукт Версии
.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