In a C# console application I want to convert an int to a string, then check the characters in the new string, and convert them to and int. This is what I have so far to do that:
int charNum = 0;
int value = 111
string valueStr = value.ToString();
int numVariant = valueStr.ToCharArray()[charNum];
Then I add this to output their values
Console.WriteLine(numVariant + " " + valueStr + " " + charNum);
Console.ReadLine();
And strangely it returns
49 111 0
Whereas what I expected it to return is
1 111 0
So what I assume is something went wrong with converting the char to a int, any suggestions on how to fix this?