Class ByteArrayExt
Extension methods for unmanged byte[]
access.
public static class ByteArrayExt
- Inheritance
-
ByteArrayExt
- Inherited Members
Methods
Peek<T>(byte[], ref int)
Peeks (and retuns) unmanaged type T
at pos
public static ref T Peek<T>(this byte[] mem, ref int pos) where T : unmanaged
Parameters
Returns
- T
Type Parameters
T
Remarks
The returned value is not copied but is a reference into mem
and
pos
gets advanced by the number of bytes representing type T
.
Poke<T>(byte[], in T, ref int)
Poke value
of unmanaged type T
into byte[]
at pos
public static void Poke<T>(this byte[] mem, in T value, ref int pos) where T : unmanaged
Parameters
Type Parameters
T
Remarks
pos
gets advanced by the number of bytes representing type T
.