musefan has given you the perfect answer. Just be aware that if the number can't be converted to an int you will get zero.
I have an extension method that I use when working with text/xml etc files to simplify stuff.
public static class ExtensionMethods<br />{<br />
Now I can can just use something like
int intFromFile = stringFromFile.ToInt32();