C# – How to convert char to int

Converting a char to an int means getting the numeric value that the char represents (i.e. ‘1’ to 1). This is not the same as casting the char to an int, which gives you the char’s underlying value (i.e. ‘1’ is 49). There are three ways to convert a char to an int: I’ll show … Read more