Can we throw exception from catch block ?

 Posted by Bhakti on 11/13/2009 | Category: C# Interview questions | Views: 13379
Answer:

Yes.
The exceptions which cant be handled in the defined catch block are thrown to its caller.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Poster on: 11/13/2009
To add to the above answer it is done through throw statement.

like

catch

{
throw;
// to throw specific exception
// throw new ArgumentException("this Error occured");
}


Hope I am right Bhakti.

(Please provide complete answer)
Thank you.

Login to post response