<PackageReference Include="System.Memory" Version="4.6.0" />

System.Span<T>

public struct Span<T>
Span represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed or native memory, or to memory allocated on the stack. It is type- and memory-safe.
namespace System { public readonly ref struct Span<T> { public ref struct Enumerator { public ref T Current { get; } public bool MoveNext(); } public int Length { get; } public bool IsEmpty { get; } public static Span<T> Empty { get; } public ref T this[int index] { [MethodImpl(MethodImplOptions.AggressiveInlining)] get; } public static bool operator !=(Span<T> left, Span<T> right); public static implicit operator Span<T>(T[] array); public static implicit operator Span<T>(ArraySegment<T> segment); public Enumerator GetEnumerator(); public Span(T[] array); public Span(T[] array, int start, int length); public unsafe Span(void* pointer, int length); public ref T GetPinnableReference(); public void Clear(); public void Fill(T value); public void CopyTo(Span<T> destination); public bool TryCopyTo(Span<T> destination); public static bool operator ==(Span<T> left, Span<T> right); public static implicit operator ReadOnlySpan<T>(Span<T> span); public Span<T> Slice(int start); public Span<T> Slice(int start, int length); public T[] ToArray(); } }