To convert from a string to an integer type you can use the Convert
class as shown in the code snippet below. The Convert class contains a
large number of static methods which allow you to convert from one type
to another.
string numberString = "1985";
int number = Convert.ToInt32(numberString);
int number = Convert.ToInt32(numberString);
Sign up here with your email
ConversionConversion EmoticonEmoticon