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 are the events raised in asp.net page life cycle?in which stage view state can be loaded?
Which authentication uses a combination of windows and iis authentication?
How can you apply a theme to your asp.net application?
What is a session government?
How can we register exception filter globally?
Which protocol is used in a web api?
What is data binding in asp net?
Which two new properties are added in asp.net 4.0 page class?
What is the postback property in asp.net?
How to set the pane area to transparent of a scrollPane component.?
What is meant by web application?
Can one dll file contains the compiled code of more than one .net language?
Is asp.net free?
What are validators and list some validators of asp.net?
Explain the difference between an exe and a dll?