The base class to all exceptions, System.Exception , has a property called Message that gives a brief description of the error. However, the Message property is readonly. So how do you set the error message of your custom exception objects? To set the error message for custom error classes:
Tip
|