So i nearly have 2k lines of code and i have forgotten to / i do not know how to have input valdation on user inputs such as
cw("Hello Please Enter your age");
cw("If you are in a Group Input the Age of the Youngest Member of the Group.");
Age = Convert.ToInt32(Console.ReadLine());
I want to Make it so that users can enter only numbers and my program will not crash when they put in somthing els.
this is a common problem in the whole of my program for the console.readlines.
Is there a way on mass that i can introduce the input valdation for numbers only and letters only when approate?
thank you in advance.
int). Then check for "Q" or "H". If neither, useint.TryParseand loop back on failure.TryParse(the last answer I see (with 12 votes) also referencesTryParse). There's got to be a better one to point to that that!!!