Make an integer putting in low 2-bytes and in high 2-bytes. - CSharp System

CSharp examples for System:Byte

Description

Make an integer putting in low 2-bytes and in high 2-bytes.

Demo Code



public class Main{
        /// <summary>
        /// Make an integer putting <paramref name="low"/> in low 2-bytes and <paramref name="high"/> in high 2-bytes.
        /// </summary>
        public static int MakeLong(short low, short high) => (int)((ushort)low | (uint)(high << 16));
}

Related Tutorials