Can we use the Throws clause to raise an exception ?

 Posted by Chvrsri on 3/23/2011 | Category: C# Interview questions | Views: 3917 | Points: 40

No. The Throws clause is not meant for raising an exception

The throw statement signals the occurrence of an exception during the execution of a program.

If the program finds a throw statement the method would terminate and returns the error to the calling method.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response