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

Is c++ or c# better?

542


What is a decimal in c#?

502


What is a multi line comment?

557


Explain About .Net remoting

567


What is the use of convert toint32 in c#?

528






What is polymorphism c# example?

485


What is thread.sleep()?

516


if you do have a stack overflow profile.what is your ranking?

1484


Is array passed by reference in c#?

516


Are all methods virtual in c#?

538


What exactly happens when we debug and build the program?

1985


What is a jagged array?

495


What is ControlBox Propertie

577


What is parallel programming in c#?

494


if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

528