src/AnvilPacker/Util/Mem.cs
/// <summary> Returns a reference to the n-th element of the span. </summary>
Returns a reference to the n-th element of the span.
Returns a reference to the n - th element of the span .
[MethodImpl(Inline)]
        public static ref T GetRef<T>(Span<T> span, nint elemOffset = 0)
        {
            return ref Unsafe.Add(ref MemoryMarshal.GetReference(span), elemOffset);
        }
[ MethodImpl ( Inline ) ] public static ref T GetRef < T > ( Span < T > span , nint elemOffset = 0 ) { return ref Unsafe . Add ( ref MemoryMarshal . GetReference ( span ) , elemOffset ) ; }
Returns a reference to the n-th element of the span.
Returns a reference to the n - th element of the span .
// return &buf[bytePos]
span
Span<T>
elemOffset
nint