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 is the difference between an implicit conversion and an explicit conversion?

680


How C# 4.0 supports dynamic programming language?

754


Can we override interface method?

721


Can you declare a class or a struct as constant?

734


What is iqueryable in linq?

639


Define assert() method? How does it work?

809


If I return out of a try/finally in c#, does the code in the finally-clause run?

736


Where is c# compiler located?

669


How many types of serialization are there in c#?

630


Can we inherit sealed class in c#?

624


What is the difference between firstordefault and first?

672


What does using do in c#?

672


What are the different types of classes?

675


Is string passed by reference in c#?

686


Why do we need delegates?

649