I’m surprised nobody has mentioned the static method built right into System.Char…
int val = (int)Char.GetNumericValue('8');
// val == 8
I’m surprised nobody has mentioned the static method built right into System.Char…
int val = (int)Char.GetNumericValue('8');
// val == 8