/// <summary> /// Swaps low and high bytes on big endian systems. Has no effect on little endian systems. /// </summary> /// <param name="swapValue">The value to convert.</param> /// <returns>a swapped value an big endian system, the same value on little endian systems</returns> public static short HostEndianToLE16(short swapValue) { HostEndian16BitValue rtn = new HostEndian16BitValue(swapValue); return((short)rtn.U16); }
/// <summary> /// Swaps low and high bytes on big endian systems. Has no effect on little endian systems. /// </summary> /// <param name="swapValue">The value to convert.</param> /// <returns>a swapped value an big endian system, the same value on little endian systems</returns> public static short HostEndianToLE16(short swapValue) { HostEndian16BitValue rtn = new HostEndian16BitValue(swapValue); return (short)rtn.U16; }