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 the difference between “out” and “ref” parameters in c#?

678


How many bytes is an int in c#?

669


How to sort an int array in c#?

710


How do you name a variable in c#?

680


What are the types in c#?

665






What is helper method in c#?

649


What sort algorithm does c# use?

682


Explain the clr triggers?

696


What does console readkey do in c#?

676


Can arraylist hold primitive types?

730


Can we override interface method?

715


How do you create dlls in .NET

761


Is string a class in c#?

631


What is session variable in c#?

737


What is the use of the dispose method in C# ?

698