#1,015 – Rendering a Byte Array as a Series of Hex Characters

You can use the BitConverter class to get a hex representation of a string of bytes.

For example:

            byte[] someBytes = { 0x83, 0xDF, 0x0A, 0xA3, 0x92 };

            string hex = BitConverter.ToString(someBytes);
            Console.WriteLine(hex);

1015-001

Advertisements

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

One Response to #1,015 – Rendering a Byte Array as a Series of Hex Characters

  1. Pingback: Dew Drop – January 21, 2014 (#1706) | Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: