1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Exception
It is represented by classes.
Exception
All the exceptions are subclasses in the built-in exception class named _, wherein it is a part of namespace System.
ApplicationException
These exceptions are user program-generated.
SystemException
These exceptions are generated by Common Language Runtime (CLR).
System.Exception
This is at the top of the standards’ exceptions hierarchy. The runtime system in C# generates all the exceptions.
System.ArithmeticException
Errors in arithmetic or conversion operation will be thrown in this exception.
System.OverflowException
When an overflow occurs in a checked operation, it will be thrown in __________.
System.ArgumentException
Any invalid argument in a method will be thrown in this exception.
System.ArgumentNullException
If there is an unacceptable argument passed to a method, it will be thrown in ______________.
System.IndexOutOfRangeException
Throw in this exception when attempting to index an array through an index that is either less than zero or greater than the maximum length of index.
System.OutOfMemoryException
If the available memory becomes too low to accommodate a memory allocation request, it will be thrown in __________.
System.StackOverflowException
The exception __________ is called when the execution stack is exhausted by having too many pending method calls.
System.FormatException
This exception checks the format of the string or argument if it is invalid.
try
This keyword is used to check for the occurrence of any exceptions enclosed to it.
catch
This keyword catches the exception that is thrown on the occurrence of exception in a try block.
throw
It is used to throw an exception manually.
finally
This keyword executes a given statement even if the exception is thrown or not thrown.
finally
This block cannot transfer control by using break, continue, return, or goto.
can
The throw keyword (can/cannot) be used outside of the try-catch block, but without the try-catch block, there will be an interruption in the process.