Can we throw exception from catch block

Answers were Sorted based on User's Feedback



Can we throw exception from catch block..

Answer / chandan kumar

yes, we can throw exception from catch block

Is This Answer Correct ?    17 Yes 2 No

Can we throw exception from catch block..

Answer / chandan kumar

yes we can, i have tried it.it is working fine

Is This Answer Correct ?    5 Yes 0 No

Can we throw exception from catch block..

Answer / sudipta

Throw statement can be used in the catch block to rethrow
the exception,which has been caught by the catch statement.

Is This Answer Correct ?    4 Yes 0 No

Can we throw exception from catch block..

Answer / brijen.patel

Yes, we can throw exception from catch block.

Is This Answer Correct ?    4 Yes 0 No

Can we throw exception from catch block..

Answer / prosanta

yes,

follow this example-

static void Main(string[] args)
{
try
{
throw new Exception();
}
catch
{
try
{
Console.WriteLine("This is the 1st
exception");
throw new Exception();
}
catch
{
Console.WriteLine("This is the 2nd
exception");
Console.Read();
}
}

}




output:
This is the 1st exception
This is the 2nd exception

Is This Answer Correct ?    5 Yes 2 No

Can we throw exception from catch block..

Answer / roopali

no we cannot

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More C Sharp Interview Questions

Why cannot you specify the accessibility modifier for methods inside the interface?

0 Answers  


What is anonymous types in c#?

0 Answers  


Why do we need to override in c#?

0 Answers  


Is stringbuilder faster than string concatenation c#?

0 Answers  


What is the adv of using System.Text.StringBuilder over System.String?

0 Answers   Siebel,






Can you declare struct members as protected?

0 Answers  


What is the difference between continue and break statement?

0 Answers  


What does exclamation mark mean in access query?

0 Answers  


What is wrong with the sample program below?

0 Answers  


What is yield break in c#?

0 Answers  


What is Serialization and how do we implement (in real time scenario)

1 Answers  


What Happens In Memory When You Box And Unbox A Value-type?

0 Answers   Siebel Systems,


Categories