how to convert char to int in c sharp code example
Example 1: c# char to int
int val = (int)Char.GetNumericValue('8');
Example 2: c convert char to int
int i = (int)(c - '0');
int val = (int)Char.GetNumericValue('8');
int i = (int)(c - '0');