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
In order to get assembly info which namespace we should import?
In which event of the page viewstate is available?
What is asp.net and how it works?
What are the data controls available in asp.net?
What is the difference between ASP Session State and ASP.Net Session State?
How asynchronous call can be implemented using delegates?
Can we use MSSql as backend in asp.net...if yes then How.?
What is the main difference between Asp.net and Vb.net?
What is %20 in a url?
What is the state management in asp.net?
What is a web api?
What is the difference between dispose() and finalize()?
What are assemblies and namespaces and explain the difference between them ?
What is view state and how it works in asp net?
How Session outproc in Sqlserver stored?