As the author of a class, you may want to generate your own exceptions to notify other developers of various error conditions. You can choose to write your own exception classes (as in the section "Declaring Your Own Exceptions"), or you can choose to generate a predefined Microsoft error like DivideByZeroException or ArgumentNullException . To throw an exception:
Tips
|