Exception Classes
The .NET Framework's model for structured exception handling centers on a class named Exception that is defined in the System namespace. The Exception class is particularly important because of one specific rule that is imposed by the Common Language Specification (CLS): Every exception object must be created from either the Exception class or a class that inherits from Exception. As a consequence, every CLS-compliant exception object shares a programming contract and an underlying implementation that is defined by the Exception class.
Why did the architects of the .NET Framework choose to employ an inheritance-based model for structured exception handling? The use of inheritance makes it possible to create different types of ...
Get Building Applications and Components with Visual Basic .NET 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.