Can you use the ‘throws’ clause to raise an exception?

 Posted by Ersudeep13 on 4/28/2016 | Category: C# Interview questions | Views: 3560 | Points: 40
Answer:

No, the throws clause cannot be used to raise an exception. The throw statement signals the occurrence of an exception during the execution of a program. When the program encounters a throw statement, the method terminates and returns the error to the calling method.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Ersudeep13