Tip: Finding Related Exceptions

When troubleshooting applications, or when developing your own exception handling routines, it's sometimes useful to get a better idea of which exceptions may be related to an exception you're more familiar with.

Many folks, for example, may be familar with the HttpException class, which is used to communicat information about errors with various web requests. But how many people know that there are several classes that derive from HttpException, including HttpParseException and HttpRequestValidationException? Knowing about these related exception types can help you understand what's going on when something goes wrong, and can also help developers communicate more specifically what's happening in their own applications when exceptional conditions arise.

So how do you find these related classes? Well, each entry in the MSDN documentation, either the version installed with Visual Studio, or the online version, provides an inheritance hierarchy for the class you're currently reading about. You can use the links there to traverse higher or lower in the inheritance tree and discover related classes of all types, not just exceptions.