- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the base class for all exceptions in C#?
The System.SystemException class is the base class for all predefined system exception. Some of the exception classes derived from the System.Exception class are the System.ApplicationException and System.SystemException classes.
The System.ApplicationException class supports exceptions generated by application programs. Hence the exceptions defined by the programmers should derive from this class.
The following are the exceptions under the base class System.SystemException −
Sr.No. | Exception Class & Description |
---|---|
1 | System.IO.IOException Handles I/O errors. |
2 | System.IndexOutOfRangeException Handles errors generated when a method refers to an array index out of range. |
3 | System.ArrayTypeMismatchException Handles errors generated when type is mismatched with the array type. |
4 | System.NullReferenceException Handles errors generated from referencing a null object. |
5 | System.DivideByZeroException Handles errors generated from dividing a dividend with zero. |
6 | System.InvalidCastException Handles errors generated during typecasting. |
7 | System.OutOfMemoryException Handles errors generated from insufficient free memory. |
8 | System.StackOverflowException Handles errors generated from stack overflow. |
Advertisements