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?
- try blocks cannot be nested.
- In one function, there can be only one try block.
- An exception must be caught in the same function in which it is thrown.
- All values set up in the exception object are available in the catch block.
- While throwing a user-defined exception multiple values can be set in the exception, object.
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
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers