Commonly Used Exceptions Defined Within the System Namespace
Exception
Meaning
ArrayTypeMismatchException
Type is incompatible with the type of the array.
DivideByZeroException
Division by zero attempted.
IndexOutOfRangeException
Array index is out of bounds.
InvalidCastException
A runtime cast is invalid.
OutOfMemoryException
Insufficient free memory exists.
OverflowException
An arithmetic overflow occurred.
NullReferenceException
An attempt was made to operate on a null reference?at is, a reference that does not refer to an object.
StackOverflowException
The stack was Overflow.
As a general rule, exceptions defined by you should be derived from ApplicationException since this is the
hierarchy reserved for application- related exceptions.