DEV Community

Discussion on: What would I change in a rewrite of C#?

Collapse
 
jeikabu profile image
jeikabu

Reduce use of exceptions in general. Some functions return an error value, others throw. Very annoying.

Collapse
 
thebuzzsaw profile image
Kelly Brown

I agree and disagree. I've come to appreciate the methods that throw. At minimum, each method that can fail should have both a throwing and non-throwing variant (Parse vs TryParse). .NET has been improving in this area (by way of things like HttpClient returning a status code and letting you choose whether to throw via helper method).