0
Can we execute multiple catch blocks in C# ?
Exception Management
4 Answers
+ 2
Aguilar , Yes. Only one will be executed. You are correct.
Just to be sure you can read this answer:
https://stackoverflow.com/questions/12583487/execution-of-multiple-catch-blocks
+ 1
The Question was Challenge and it's answer was No, i suppose the point of question is like that; yeah u can write multiple catch blocks but just one of them can execute and handle the exception.
0
Yes. In a try block there maybe more than one statement that are likely to throw exception. So you can associate multipe catch blocks with single try block.
This lesson shows the same.(On third page)
https://www.sololearn.com/learn/CSharp/2690/?ref=app
0
I just got this question. It is not very clear. I think that it should be removed. Too ambiguous.
I found an SO post where multiple catch blocks will be ran. Of course they are nested. But defintily two will run. https://stackoverflow.com/questions/4035477/can-i-execute-multiple-catch-blocks