A.3. Understanding Exception Classes

By now you have a basic idea of how to implement structured exception handling in your code. Now let’s take a quick overview of exception-related classes provided by the .NET Framework library.

A.3.1. The Exception Class: Mother of All Exceptions

The Exception class is the first class we will discuss. It caters to errors that occur during normal application execution. This is the base class for all exception classes. In our previous samples, we have already seen how to use the Exception class. Table A.1 describes its properties.

Listing A.8 uses the Exception class properties to display information about an exception.

Listing A.8. Using Exception properties
 // The error within this block try { // Suspect ...

Get Graphics Programming with GDI+ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.