Do not overuse the custom exceptions, use the ones provided by the framework

As a .NET developper you may be tempted to create a custom exception class for each of your exceptions you throw.

But plenty of them are already present in the .NET framework.

If your need matches one of these Exceptions, use it instead of reinvent the wheel.

I generated a list of the available exceptions, you can consult it here.

About Sam Beauvois

Application Developer, .NET enthusiast since 2004, I'm interested in technology watch, usability, code quality, patterns & practices, UX, ...

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>