CAN YOU USE THE 'THROWS' CLAUSE TO RAISE AN EXCEPTION?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1709  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    Can you use the 'throws' clause to raise an exception?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!