What is an exception in Csharp ?
An exception is a runtime error.
An exception is a compilation error.
An exception is a runtime error which will be occuring when clr encounters an un-known situation.
options 1 and 3 are correct.
an exception is a runtime error which will be produced when clr encounters an un-known situation.
Example: assume you have written a code for reading data from a text file into a string variable.
Assume during program execution some one has deleted students.txt file from D drive, now clr do not know how to read data from a file which is not existing. Hence clr encounters a situation which can not be resolved on its own hence program execution is terminated.
Back To Top