adspace


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

How to assign Null value to Var?

1060


What is an abstract class c#?

966


What is expression tree in c#?

996


Why can't we use a static class instead of singleton?

950


How do you inherit a class into other class in c#?

991


Which namespaces are necessary to create a localized application?

1139