beta.blog

Programming

C# – Convert UInt16 To Byte Array

by 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.

1 Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!