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