Can we throw exception from catch block ?

Answer Posted / nilesh

Yes. A throw statement can be used in the catch block to re-
throw the exception, which has been caught by the catch
statement. For example:

catch (InvalidCastException e)
{
throw (e); // Rethrowing exception e
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of validation are there?

516


When maintaining session through sql server, what is the impact of read and write operation on session objects?

527


How to rename a table using sql queries?

565


Who is using asp.net?

497


Why do we need Sessions?

576






Which two new properties are added in asp.net 4.0 page class?

519


Can you explain the importance of finalize method in .net?

581


What is inproc and outproc?

518


What is applicatio domain?

569


What is session and cookies in asp.net?

548


If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?

518


IN an ASP.NET Web application if there is any error, how can you debug?

577


What are the advantages and disadvantages of session?

658


Is session stored in browser?

524


Can you change a Master Page dynamically at runtime?

570