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

What is #region in c#?

0 Answers  


What is verbatim string?

0 Answers  


What are actions in c#?

0 Answers  


Is c# 8 released?

0 Answers  


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList<string, AddInProject> m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList<string, AddInProject>(); } } }

0 Answers   ABC, WinsIndia,


main concept of c sharp

3 Answers  


Is php better than c#?

0 Answers  


Can we inherit partial class in c#?

0 Answers  


Where CANNOT Destructors be implemented ?

3 Answers  


What is object array in c#?

0 Answers  


What is the difference between selection and projection?

0 Answers  


Indexers in c#?

8 Answers   Intaglio, Microsoft, TCS,


Categories