Can we throw exception from catch Block?
Answer Posted / devender kumar
Yes. we can throw the exception from the catch block.
If anyone have confusion then try this code:
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Test();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
private void Test()
{
try
{
throw new Exception("Dev");
}
catch (Exception ex)
{
throw ex;
}
}
Is This Answer Correct ? | 40 Yes | 2 No |
Post New Answer View All Answers
What is round trip in asp.net?
If 200 is for all successful operation then why do we have 201 response codes?
Explain the differences between managed and unmanaged code?
what cut off mark for po's,what questions they asked for interview?
Can we create a multiple user simultaneously ?
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?
Give 2 examples for scenarios when routing is not applied?
What is cross page posting in asp net?
What is asp.net web pages?
What is session id in web application?
What is the biggest disadvantage of “Other Return Types” in Web API?
Define resource files.
Explain the differences between clr & cts?
Explain server side state management system.
What is an il?