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
Interesting answers but the docs say differently:
Use the
GetNumericValuemethods to convert aCharobject that represents a number to a numeric value type. UseParseandTryParseto convert a character in a string into aCharobject. UseToStringto convert aCharobject to aStringobject.
http://msdn.microsoft.com/en-us/library/system.char.aspx