Below code will show you how to use custom method.
var str = "12356";
var temp = 0;
for(int i = 0; i< str.Length; i++)
temp = temp * 10 + (str[i] - '0');
For less than 2,50,000 iterations it takes less than 0.01 second and every other function takes close to 0.03 second.