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

Define cookie.

578


Is asp.net and .net are same or different?

537


What are the events in a page life cycle?

543


What are server side controls?

543


What is mta?

635






Explain the steps needed to be performed in order to create an animation in xaml?

566


What is recordset asp?

555


Is asp.net core faster?

549


What is asp.net with mvc? : Asp.Net MVC

528


Which object is used to encapsulate the state of the client and the browser in ASP.NET?

597


What is voluum?

549


What is web api and why to use it?

568


Explain what are webservices?

552


In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?

602


Is it possible to migrate visual interdev design-time controls to asp.net?

575