xxxxxxxxxx
/*
A Span<T> in C# is a type that represents a contiguous region of memory as
a read-only or read-write collection of values. It provides an efficient and
safe way to access and manipulate arrays and sub-arrays of data,
*/ without creating additional memory allocation.
int[] numbers = { 1, 2, 3, 4, 5 };
Span<int> numbersSlice = numbers.AsSpan().Slice(1, 3);
foreach (int number in numbersSlice)
{
Console.WriteLine(number);
}