C# provides a number of Exception Classes, all of which inherit from the System.Exception.
.
Exception Class
|
Description
|
|
SystemException
|
The base class for all exceptions
|
|
AccessException
|
Unable to access a method, a field or some other member.
|
|
ArgumentException
|
An argument value passed to a method was invalid, wrong type etc.
|
|
ArgumentNullException
|
A null argument (parameter) was passed to a method which requires a value, the argument is not missing, it just has a value of Null
|
|
ArgumentOutOfRangeException
|
The value passed in or returned by a method is out of the acceptable range
|
|
ArrayTypeMismatchException
|
One or more of the objects in array are of different types |
|
ArithmeticException
|
Arithmetic overflow / underflow occured
|
| BadImageFormatException |
Image format is unrecognised.
|
|
Core Exception.
|
Runtimes Base Class for Exceptions.
|
DivideByZeroException |
Zero was used as a denominator |
|
FormatException |
Argument format is not allowed |
|
IndexOutofRangeException |
An arrays index(position) is out of bounds for the array. |
|
InvalidCastException |
An object was cast to an unknown type. |
|
InavalidOperatorException |
Method called at an unrecognised time. |