Skip to content

Instantly share code, notes, and snippets.

@ThePhD
Created December 23, 2013 02:38
Show Gist options
  • Save ThePhD/8091057 to your computer and use it in GitHub Desktop.
Save ThePhD/8091057 to your computer and use it in GitHub Desktop.
public static void GetBytes ( UInt16 data, byte[] bytes, int offset ) {
bytes[ offset++ ] = (byte)( data & 0xFF );
bytes[ offset++ ] = (byte)( ( data >> 8 ) & 0xFF );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment