Q&A
Ask and answer questions to make information more available to wider audiences.
Lane Adgate @adgatelane   06, Apr 2023 12:00 AM
multiple catch blocks
Can multiple catch blocks be executed in C#?
answers 3
 
Answer 1
Jessica Lukeson @lukesonjessica   08, Apr 2023 12:13 AM
No, once it enters catch block it will not enter again.
 
Answer 2
Beckett Fourcard @fourcardbeckett   08, Apr 2023 12:09 AM
No if any catch block gets executed it simply means compiler has found the exception then he will never go to the next one. Compiler will only execute the catch block which comes first and is appropriate.
 
Answer 3
Frank Amundson @amundsonfrank   08, Apr 2023 12:03 AM
No, you cannot execute multiple catch blocks of the same type.