C # error exception list,

Source: Internet
Author: User

C # error exception list,

Exception: The base class of all Exception objects.
SystemException: The base class of all errors generated during the runtime.
IndexOutOfRangeException: It is triggered when the subscript of an array exceeds the range.
NullReferenceException: triggered when an empty object is referenced.
InvalidOperationException: when a call to a method is invalid for the current state of the object, it is triggered by some methods.

ArgumentException: The base class for all parameter exceptions.
ArgumentNullException: triggered by a method when the parameter is null (not allowed.
ArgumentOutOfRangeException: When a parameter is not within a given range, it is triggered by a method.
InteropException: The base class of an exception that occurs in or outside the CLR environment.
ComException: an exception that contains the HRESULT information of the COM class.
SEHException: an exception that encapsulates Win32 structure exception handling information.
SqlException: encapsulates SQL operation exceptions.

Common exception objects:

ArgumentNullException an empty parameter is passed to the method. This method cannot accept this parameter.
The value of ArgumentOutOfRangeException is out of the range.
ArithmeticException indicates that Arithmetic overflow or underflow occurs.
ArrayTypeMismatchException tries to store error-type objects in the array
The BadImageFormatException image format is incorrect.
DivideByZeroException
DllNotFoundException cannot find the referenced DLL
FormatException parameter format Error
IndexOutOfRangeException array index out of range
InvalidCastException invalid class
The call time of the InvalidOperationException method is incorrect.
The method called by NotSupportedException is not implemented in the class.
NullReferenceException tries to use an unallocated reference
OutOfMemoryException insufficient memory space
StackOverflowException Stack Overflow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.