How to make this piece of code loop asking for input from the user until int.TryParse()
is successful?
//setX public void setX() {
This can help too
public int fun() { int Choice=0; try { Choice = int.Parse(Console.ReadLine()); return choice; } catch (Exception) { return fun(); } }