Can we throw exception from catch block

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the base class from which all value types are derived?

497


Explain how to parse a datetime string?

506


What is the symbol used for in c#?

493


Write a program in C# for checking a given number is PRIME or not.

626


What is connection pooling in ado.net?

542






how encapsulation is implemented in c#

633


What are access modifiers in c#?

548


What is the difference between constant and readonly in c#?

431


What is a framework in c#?

466


What is typeof c#?

518


Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?

505


What are annotations in c#?

521


What is expandoobject in c#?

478


What is written in c#?

531


What does console mean c#?

493