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
List down the sequence of methods called during the page load.
Define static member?
Explain the asp.net page life cycle.
Why we use asp.net for website development?
What is enableviewstatemac in asp net?
List the types of authentication supported by asp.net?
What is the benefit of WebAPI over WCF?
Write a code for passing ArrayList in Web API?
What are Session states available and its Uses?
What is virtual directory in asp.net?
What is a swagger in web api?
How does session work in asp net?
What are server activated objects?
How you can access the values from the Repeater control in ASP.NET?
Which adapter should you use, if you want to get the data from an access database?