How many catch blocks can be there for a single try block?

Answer Posted / d.s naidu

Single try block can handle multiple catch blocks.Let
assume if you have 4 catch blocks for a single try block.
while excuting/debugging the code, if the exception raises
that will go the appropriate catch block and resolve the
problem by the programmer. the remaining 3 catch blocks
will raise , if those really having the exception as per
the code logic

Is This Answer Correct ?    20 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is private class in c#?

488


Explanation on Generic?

564


What is thread in c#?

555


Is and as keyword in c# net?

543


Why do we Need of static class in c#?

654






Why reflection is used in c#?

508


Why do I get a security exception when I try to run my c# app?

560


Is namespace a class?

504


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

539


Is void a class?

495


What is assembly and dll in c#?

477


Can you mark static constructor with access modifiers?

568


What is xpath in c#?

492


What is a linked list c#?

513


Can a struct inherit from an interface in c#?

523