I have encountered a problem where my program crashes due to the input of the user not following the variable data type. What I am asking the user to do is register some data f
Use Int32.TryParse() and handle the case when it's not an integer. The return value indicates whether the operation succeeded.
For more information see
http://msdn.microsoft.com/en-us/library/system.int32.tryparse.aspx