Can multiple catch blocks be executed?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the parsefloat function do?

493


Describe a Struct ?

543


In a site to turn off cookies for one page which method is followed?

510


What is inheritance in csharp?

522


what is the difference between interface and multiple interface?

541






What is difference between .net and c#?

472


What is inline function in c#?

513


What is private protected in c#?

502


Differentiate between static class and singleton instance?

524


What is Covariance and contravariance in C#?

561


Difference between a sub and a function in c#.

541


What are controls in c#?

480


Is it possible to execute multiple catch block for a single try statement?

583


What is lambda expression in c#?

509


Explain the importance and use of each, version, culture and publickeytoken for an assembly.

531