[C#] Convert a Byte to Hexadecimal

Jan 27 2006 4:50 AM
Hi,

Everything is in the title I have an array in Byte[] which contains the ASCII code of a string but I have to give to my function a Byte[] that have Hex values of my string and not ASCII. How can I do that?

I have actually this code:

String abcd = "You got 1 voicemail";
Byte[] test = System.Text.ASCIIEncoding.UTF8.GetBytes(abcd);

I'm developping in C#.NET

Answers (7)