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

Explain asp.net mvc request life cycle? : asp.net mvc

485


Which is better php or asp.net?

514


Why do we use asp.net?

582


Explain swagger components.

563


How use Xml data in ASP.net?

557






Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?

519


What are the Types of chaching. How to implement caching

560


If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?

639


Write a code for sending an email from asp.net application.

534


Can I combine classic asp and asp.net pages?

530


Who generates session id?

486


They mostly asked difference between versions of technologies

934


What kind of programming language is ASP.NET?

600


What is viewstate information stored?

596


which one is more flexibility and reliability and durability asp.net (VS)php which one is best and which one we do nice to create dynamic websites

1670