C# Programming - Exception Handling - Discussion

Discussion Forum : Exception Handling - General Questions (Q.No. 11)
11.
Which of the following statements are correct about exception handling in C#.NET?
  1. try blocks cannot be nested.
  2. In one function, there can be only one try block.
  3. An exception must be caught in the same function in which it is thrown.
  4. All values set up in the exception object are available in the catch block.
  5. While throwing a user-defined exception multiple values can be set in the exception, object.
1 only
1 and 2 only
3 only
4 and 5 only
All of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
1 comments Page 1 of 1.

Nidhi said:   1 decade ago
Ans 1 not correct because try may nested
ans 2 is incorrect because in one functions there can be more than one try block as we already discuss try may nested
ans 4 and 5 is correct because for every try there must be have a catch block

Post your comments here:

Your comments will be displayed after verification.