I need help converting hexadecimal characters to decimal characters in c# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I need help converting hexadecimal characters to decimal characters in c#

I have an assignment at school to make a program that can convert individual hexadecimal characters to individual decimal characters, meaning like ABF would be converted to 10 11 15. I have no idea how to do this, can anyone help?

23rd Mar 2017, 10:39 AM
Ryan Cain
Ryan Cain - avatar
1 Answer
+ 4
Iterate through every character of your hex string (maybe a for-loop is useful), then use a switch statement to print 10 if you get an A, 11 if it's a B...
23rd Mar 2017, 5:51 PM
Álvaro