public static void WriteValueU64(this Stream stream, UInt64 value, bool littleEndian) { if (ShouldSwap(littleEndian)) { value = value.Swap(); } byte[] data = BitConverter.GetBytes(value); Debug.Assert(data.Length == 8); stream.Write(data, 0, 8); }
public static void WriteValueU64(this Stream stream, UInt64 value, Endian endian) { if (ShouldSwap(endian)) { value = value.Swap(); } var data = BitConverter.GetBytes(value); Debug.Assert(data.Length == 8); stream.WriteBytes(data); }