What is the proper way to convert a char to int?
This gives 49:
int val = Convert.ToInt32('1');
//int val = Int32.Parse("1"); // Works
I don't want to convert to string and then parse it.
What is the proper way to convert a char to int?
This gives 49:
int val = Convert.ToInt32('1');
//int val = Int32.Parse("1"); // Works
I don't want to convert to string and then parse it.