14.7. Implement a Custom Exception Class
Problem
You need to create a custom exception class so that you can use the runtime's exception-handling mechanism to handle application-specific exceptions.
Solution
Create a serializable class that inherits the System.Exception class. Add support for any custom data members required by the exception, including constructors and properties required to manipulate the data members.
|
Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.