Make an short from 2-bytes. - CSharp System

CSharp examples for System:Byte

Description

Make an short from 2-bytes.

Demo Code



public class Main{
        /// <summary>
        /// Make an short from 2-bytes.
        /// </summary>
        public static short MakeWord(byte low, byte high) => (short)(low | (ushort)(high << 8));
}

Related Tutorials