Programming
C# – Convert UInt16 To Byte Array
by admin on Aug.16, 2012, under Programming
This is how to programmatically convert a UInt16 into a byte array in C-Sharp.
UInt16 u = 3; byte[] b = BitConverter.GetBytes(u);
Note: The BitConverter class is part of the System namespace.