How do I convert a string to an integer in C#?
int i; string whatever; //Best since no exception raised int.TryParse(whatever, out i); //Better use try catch on this one i = Convert.ToInt32(whatever);