Table of Contents

Method CreateReadOnlySpanSaturating

Namespace
Zyl.ExSpans.Impl
Assembly
ExSpans.Core.dll

CreateReadOnlySpanSaturating<T>(ref T, nint)

[Saturating] Creates a new read-only span over a portion of a regular managed object.

[FakeCLSCompliant(false)]
public static ReadOnlySpan<T> CreateReadOnlySpanSaturating<T>(ref T reference, nint length)

Parameters

reference T

A reference to data.

length nint

The number of T elements that reference contains.

Returns

ReadOnlySpan<T>

A read-only span.

Type Parameters

T

The type of the data items.