1

How to convert ASCII char values example 'a' to its eqvelent hexa value 41 ?

0

3 Answers 3

3

Convert to int then to hex

Convert.ToInt32('a').ToString("X");

a is actually 61, and A is 41

0
3

C# has a built in function to convert to byte : Convert.ToByte('a')

2

String.Format("{0:X}", Convert.ToInt32(letter));

Not the answer you're looking for? Browse other questions tagged or ask your own question.