When creating a program that takes a number (like 1253) and turns it into 125^3, I get an odd error where converting a string won't seem to work. Here is my code:

```
        string example = "1253";

        // grab all but the last character
        int num = Convert.ToInt32(example.Substring(0, example.Length - 1));
        Console.WriteLine(num);

        // grab the last character
        //int pow = Convert.ToInt32(example.Substring(example.Length - 1));
        int pow = Convert.ToInt32(example[example.Length - 1]);
        Console.WriteLine(pow);

        // output num to the power of pow
        Console.WriteLine(Math.Pow(num, pow));
        Console.ReadKey();

```

The first initialization of the variable pow works correctly but the second one (not commented out) does not for some reason. The different ways of grabbing the last character of a string work, but for some reason with the first "3" will convert to 3, but for the latter "3" will convert to 51.

Here is the output when using the commented initialization of pow:  

125  

3  

1953125 

Here is the output when using the uncommented initialization of pow:  

125  

51  

8.75811540203011E+106 

I'm fairly new to C# so any help would be much appreciated. Thank you!