Can multiple catch blocks be executed?

Answers were Sorted based on User's Feedback



Can multiple catch blocks be executed?..

Answer / amina awan

Multiple catch blocks will not be executed. But we can use multiple catch blocks for a try block. The respective catch block will get executed according to the error arises.

Is This Answer Correct ?    3 Yes 0 No

Can multiple catch blocks be executed?..

Answer / photon

No, When the Exception handled the Correct Catch Block
,After that the cursor is move to finally Block, the below
catch block was not handled.

Is This Answer Correct ?    1 Yes 0 No

Can multiple catch blocks be executed?..

Answer / guest

No, once the proper catch code fires off, the control is
transferred to the finally block (if there are any), and
then whatever follows the finally block

Is This Answer Correct ?    0 Yes 0 No

Can multiple catch blocks be executed?..

Answer / vijay saxena

No,

try
{
int p = 0;
int t = 6 / p;
}
catch (ArithmeticException ex)
{
Console.WriteLine("Arithmetic Exception");
}
catch (Exception ex)
{
Console.WriteLine("General Exception");
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is method overriding in c#

0 Answers  


FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ? EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER????? PLEASE REPLY...

2 Answers  


Can we inherit class that contains only one private constructor?

0 Answers  


What is a type c#?

0 Answers  


Why do I get a syntax error when trying to declare a variable called checked?

0 Answers  






Can you declare the override method static while the original method is non-static?

2 Answers   Mind Tree,


Why do we use constructors in c#?

0 Answers  


What are virtual methods? How are they used?

3 Answers   TCS,


What are the new features in c# 2.0?

0 Answers  


in object oriented programming, how would you describe encapsulation?

0 Answers   Siebel Systems,


What is the function of .IsDescendent()?

0 Answers   Abacus,


Which controls do not have events?

0 Answers  


Categories