logoalt Hacker News

xnorswaplast Monday at 9:30 AM1 replyview on HN

Does it? Int.Parse says it can only return those 2 exceptions or ArgumentNullException, but nulls have been handled already.

https://learn.microsoft.com/en-us/dotnet/api/system.int32.pa...


Replies

bob1029last Monday at 11:01 AM

Fine but with all that code we are implying there is some case we don't want to catch for some reason. If any effective parse error should always throw we should simply do that instead of playing games.

show 1 reply