How to get unsigned short (always 16 bit, machine byte order) binary string in c# from integer?
Number can be from 1 to 65000.
How to get unsigned short (always 16 bit, machine byte order) binary string in c# from integer?
Number can be from 1 to 65000.
I could not get exactly what you need but a simple cast could do this.
static void Main()
{
int i = 50;
ushort short_val = (ushort)i;
uint uint_val = (uint)i;
Console.WriteLine(uint_val);
Console.ReadLine();
}