Make Exceptions work [closed]

There are some flaws in your code: you should prefer int.TryParse instead of Parse. An Exception should be an unexpected behavior, where you have to react in some way. A userinput is not unexpected, you know there’s a chance that the use inputs invalid data which you can/have to validate. When you use exceptions, you … Read more