Parse the string into chars, multiply each char int value by 10^(reversed index of char);
using System;
using System.Linq;
namespace ParseTest
{
public class Program
{
static void Main()
{
var s = "129";
var r = s.Reverse();
var sum = 0;
for (var i = 0; i < r.Count(); ++i)
{
sum += (r.ElementAt(i) - '0') * (int)Math.Pow(10, i);
}
Console.WriteLine("int is {0}", sum);
}
}
}
Also, I don't think I need to point out that you shouldn't be doing this if this is for a real application, use the built in conversions instead.
But, for as a purely academic exercise, the above should work.
Hope this helps,
Fredrik