I have a char in c#:
char foo = \'2\';
Now I want to get the 2 into an int. I find that Convert.ToInt32 returns the actual decimal value o
I've seen many answers but they seem confusing to me. Can't we just simply use Type Casting.
For ex:-
int s; char i= '2'; s = (int) i;