how to add a char to int variable c# 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');