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

1. What is IIS. pl explain practically. 2. Difference b/w webserver and application server. pl explain practically.

1 Answers  


What is an int in c#?

0 Answers  


Can we use "this" command within a static method?

0 Answers  


Explain how can you clean up objects holding resources from within the code?

0 Answers  


Explain the 3 types of properties in c# with an example?

0 Answers  






What is instantiating a class in c#?

0 Answers  


What is the use of iqueryable in c#?

0 Answers  


Is and as in c#?

0 Answers  


What?s the role of the DataReader class in ADO.NET connections?

2 Answers  


What are All kind of access specifiers for a class and for methods

0 Answers  


explain the features of static/shared classes.

0 Answers  


What is a console operator?

0 Answers  


Categories