Can we throw exception from catch block
Answers were Sorted based on User's Feedback
Answer / chandan kumar
yes, we can throw exception from catch block
Is This Answer Correct ? | 17 Yes | 2 No |
Answer / chandan kumar
yes we can, i have tried it.it is working fine
Is This Answer Correct ? | 5 Yes | 0 No |
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 |
Answer / brijen.patel
Yes, we can throw exception from catch block.
Is This Answer Correct ? | 4 Yes | 0 No |
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 |
Explain the Usage of web.config
What are the generation of Garbage Collection in C# .NET ?
Is c# pass by reference?
Tell me the difference between value passing and address passing?
Explain the difference between Response.Write () and Response.Output.Write ().
What is the meaning of 0 in c#?
What is dataset and dataadapter in c#?
What is an arraylist in c#?
What is ildasm.exe used for?
WHICH IS THE BEST BOOK FOR A BEGINNER TO LEARN AP.NET 3.5, C#.NET & ALL THE FEATURES OF VISUAL STUDIO2008? WHAT ARE THE CERTIFICATIONS IN THIS FIELD? WHICH IS BEST BOOK FOR CLAERING CERTIFICATION EXAM? PLZ HELP ME YAAR
What do u meant by "SBI" of an object?
When Should You Call The Garbage Collector In .net?