You can use the Integer.TryParse method to validate a String and also, if it passes, convert it to an Integer. You'll find plenty of examples online and you should also read the MSDN documentation for that method. You'll find it under Int32.TryParse.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.