For some reason I always have to go searching for this sample code when I want it and it's never as easy to find as I want it to be. This is a very nice starting point for creating your own custom exception classes in C#. The translation to VB.NET is straightforward.
using
namespace
Note that there is some controversy regarding whether you are supposed to inherit from Exception or ApplicationException for custom exceptions due to Microsoft giving inconsistent guidance.
This is the source of information I've giving the most authority to on this issue in my choice of inheriting from Exception:
Brad Abrams Blog
Remember Me
Powered by: newtelligence dasBlog 1.8.5223.2
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2009, Michael Maddox
E-mail