public ushort ReadUShort(bool ReverseEndianness) { byte[] array = this.ReadBytes(2, false); if (!(ReverseEndianness ^ BitConverter.IsLittleEndian)) { return((ushort)KeyGenerator.BytesToShort(array)); } return(BitConverter.ToUInt16(array, 0)); }