EDP Flashcards
is represented by classes
Exception
All the exceptions are subclassesin the built-in exception class named blank,
wherein it is a part of namespace System.
Exception
These exceptions are user program-generated.
ApplicationException
These exceptions are generated by Common Language Runtime (CLR).
SystemException
This is at the top of the standards’ exceptions hierarchy. The runtime system in C#
generates all the exceptions.
System.Exception
Errors in arithmetic or conversion operation will be thrown in this exception
System.ArithmeticException
When an overflow occurs in a checked operation, it will be thrown in
OverflowException.
System.OverflowException
Any invalid argument in a method will be thrown in this exception.
System.ArgumentException
If there is an unacceptable argument passed to a method, it will be thrown
in blank.
System.ArgumentNullException
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.IndexOutOfRangeException
The exception StackOverflowException is called when the
execution stack is exhausted by having too many pending method calls.
System.StackOverflowException
If the available memory becomes too low to accommodate a memory
allocation request, it will be thrown in OutOfMemoryException.
System.OutOfMemoryException
This keyword is used to check for the occurrence of any exceptions enclosed to it.
try
This keyword catches the exception that is thrown on the occurrence of exception in a try block.
catch
, it requires or inheritsthose exceptions in blank or one of its standard derived
classes.
System.Exception
This keyword executes a given statement even if the exception is thrown or not thrown. This block
cannot transfer control by using break, continue, return, or goto.
finally
It is used to throw an exception manually.
throw
This is a class in C#.net that can be found in the System.Threading namespace
Thread
The blank operator is used to create a
new object.
new
The blank an instance of a class derived from the Exception class.
exception_Objectis
Listing 1 shows how blank is thrown manually.
DivideByZeroException
a Running thread can be forced to the
Stopped state by calling the blank method.
Abort