C#:Convert a String to a Number
The static method
int.Parse will an integer from
There is a danger that the string does not represent a valid number in which case an exception will be raised.
Convert may also be used for parsing strings.
Other Parse methods are available with the other base types:
float.Parse long.Parse double.Parse
Other Convert methods include
Convert.ToBoolean Convert.ToSingle Convert.ToDouble
The value "1234" is a string, you need to treat it as a number - to add 1, giving 1235.