I have the following code:
aVariable = int.Parse(Console.ReadLine());
One problem I have is I cannot find any support material to help validate the user input, for instance if the user pressed the letter a, this would simply kill the program.
What can I do? Where can I find a decent tutorial?
int.Parse throws a FormatException, when the string cannot be parsed. You can catch this exception and handle it, e.g. show an error message.
Another way is to use TryParse: