I want to test in my program if the user input is a number, because I don’t want the program to crash.
I’ve already tried
int.Parse(ipt);
but this doesn’t work if the user puts in a non-number.
>Solution :
You can use this:
int outInt;
bool isNumeric = int.TryParse(ipt, out outInt);