Can multiple catch blocks be executed?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
What is the lock statement in c#?
What is gac? What are the steps to create an assembly and add it to the gac?
Why is c# used?
Explain about Threading Types.
Why dictionary is faster than list?
What are properties in c#. Explain with an example?
Who introduced c#?
What are strongly typed objects?
How to reverse each word in a string using c#?
What does args mean in c#?
What is the difference between ref and out parameters in c#?
What is the difference between int and int in c#?