c# a letter in string to int code example Example: c# char to int int val = (int)Char.GetNumericValue('8');