Home > DeveloperSection > Interviews > Can you use the 'throws' clause to raise an exception?

Posted on    August-27-2014 11:51 PM

 C# C# 
 1 Answer(s)
  1172  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    August-27-2014 12:00 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick