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 the concept of View Model in MVC?

796


What are the various ways to send content from one page to another?

701


What are sessions and cookies?

751


Explain culture and uiculture values.

748


Which library is used by the testers and developers to develop automated tests and create testing tools?

740


How many types of cookies are there in asp.net?

720


Explain about Multi-Language integration?

793


What are the different properties of server control that exists?

768


What is Razor View Engine

819


Are cookies client side or server side?

664


What are the different types of validation controls provided in ASP.NET?

871


Define secured sockets layer.

696


What is inproc mode in session?

678


How many types of validators are there in asp net?

682


Can you explain the basic use of dataview?

815