if I have:
char[] hexText = new char[9]; //5A3F0000A
char c = hexText[9]; //A
int lastD = // will be 10;
I tried to convert it but it failed.. how to do it?
Thank you!
You can handle this base conversion using an ordered string of your hex characters and the IndexOf
string method.
string hexabet = "0123456789ABCDEF";
char c = 'A';
int lastD = hexabet.IndexOf(c);
Console.WriteLine(lastD); // 10