How do I convert a string to an integer in C#?
You can use either,
int i = Convert.ToInt32(myString);
or
int i =int.Parse(myString);