Class |
Description |
Base Exception Type: |
System.Exception |
The base type of all exceptions. |
System.ApplicationException |
The exception that is thrown when a non-fatal application error occurs. |
System.SystemException |
Defines a base class for predefined exceptions in the System namespace. |
Exception types that are directly derived from System.SystemException: |
System.accessviolationexception |
The exception that is thrown when attempting to read and write protected memory. |
System.ArgumentException |
The exception that is thrown when one of the arguments supplied to the method is invalid. |
System.Collections.Generic.KeyNotFoundException |
Specifies the exception that is thrown when the key used to access an element in the collection does not match any key in the collection. |
System.IndexOutOfRangeException |
The exception that is thrown when an array is accessed because the element index exceeds the bounds of the array. |
System.InvalidCastException |
The exception that is thrown because of an invalid type conversion or display conversion. |
System.InvalidOperationException |
The exception that is thrown when a method call is not valid for the current state of an object. |
System.invalidprogramexception |
The exception that is thrown when the program contains invalid Microsoft intermediate language (MSIL) or metadata, which usually indicates that there is a bug in the compiler for the build program. |
System.IO.IOException |
The exception that is thrown when an I/O error occurs. |
System.NotImplementedException |
The exception that is thrown when a requested method or operation cannot be implemented. |
System.NullReferenceException |
The exception that is thrown when an attempt is made to manipulate an empty object reference. |
System.OutOfMemoryException |
The exception that is thrown when there is not enough memory to continue executing the program. |
System.StackOverflowException |
The exception that is thrown when the execution stack overflows because of too many pending method calls. |
Exception types that are directly derived from System.ArgumentException: |
System.ArgumentNullException |
The exception that is thrown when a null reference is passed to a method that does not accept it as a valid parameter. |
System.ArgumentOutOfRangeException |
The exception that is thrown when the parameter value exceeds the allowable range of values defined by the calling method. |
Exception types that are directly derived from System.ArithmeticException: |
System.DivideByZeroException |
The exception that is thrown when attempting to divide an integer value or decimal value with 0. |
System.notfinitenumberexception |
The exception that is thrown when the floating-point value is positive infinity, negative infinity, or non-numeric (NaN). |
System.OverflowException |
The exception that is thrown when an arithmetic operation, type conversion, or conversion operation in the selected context causes an overflow. |
Exception types that are directly derived from system.ioexception: |
System.IO.DirectoryNotFoundException |
The exception that is thrown when a file or part of a directory is not found. |
System.IO.DriveNotFoundException |
The exception that is thrown when an attempt to access a drive or share is not available. |
System.IO.EndOfStreamException |
The exception that is thrown when the read operation attempts to exceed the end of the stream. |
System.IO.FileLoadException |
The exception that is thrown when a managed program is found but cannot load it. |
System.IO.FileNotFoundException |
The exception that is thrown when an attempt to access a file that does not exist on disk fails. |
System.IO.PathTooLongException |
The exception that is thrown when the path name or file name exceeds the system-defined maximum length. |
Other common exception types: |
ArrayTypeMismatchException |
An attempt was made to store an object of the wrong type in an array. |
BadImageFormatException |
The graphic is in an incorrect format. |
DivideByZeroException |
Except for 0 exceptions. |
Dllnotfoundexception |
The referenced DLL was not found. |
FormatException |
Parameter format is incorrect. |
Methodaccessexception |
An attempt was made to access a private or protected method. |
MissingMemberException |
Access an invalid version of the DLL. |
NotSupportedException |
The called method is not implemented in the class. |
PlatformNotSupportedException |
This error is thrown when the platform does not support a particular property. |