1) There are the following statements that are given below, which is correct about an exception in C#.NET?
- The exception occurs at the time of compilation
- The exception occurs during program loading
- The exception occurs during JIT compilation
- The exception occurs during program execution
Correct answer: 4
The exception occurs during program execution
In the above statements, the 4th statement is correct about exceptions.
2) In C#.NET, we write a program that generates a runtime error, and we did not write code to catch the exception, then which of the following will catch it?
- Common Language Runtime
- Operating System
- C# compiler
- Linker
Correct answer: 1
Common Language Runtime
In the .NET framework, CLR is responsible for uncaught exceptions.
3) There are following options are given below, which is not useful to handle an exception in C#.Net?
- try
- catch
- errorcode
- finally
Correct answer: 3
errorcode
In the .NET framework, "errorcode" is not useful to handle an exception.
5) Can we use multiple catch blocks associated with try block in C#.NET?
- Yes
- No
Correct answer: 1
Yes
Yes, we can use multiple catch blocks associated with the try block.