Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Developer's Guide
Exception Handling Fundamentals

The common language runtime supports an exception handling model based on the concepts of exception objects and protected blocks of code. The runtime creates an object to represent an exception when it occurs. You can also create your own exception classes by deriving classes from the appropriate base exception.

All languages that use the runtime handle exceptions in a similar manner. Each language uses a form of try/catch/finally structured exception handling. This section provides several examples of basic exception handling.

How to: Use the Try/Catch Block to Catch Exceptions

Describes how to use the try/catch block to handle exceptions.

How to: Use Specific Exceptions in a Catch Block

Describes how to catch specific exceptions.

How to: Explicitly Throw Exceptions

Describes how to throw exceptions and how to catch exceptions and then throw them again.

How to: Create User-Defined Exceptions

Describes how to create your own exception classes.

Using User-Filtered Handlers

Describes how to set up filtered exceptions.

How to: Use a Finally Block

Explains how to use the finally statement in an exception block.

Exceptions Overview

Provides an overview of common language runtime exceptions.

Exception Class and Properties

Describes the elements of an exception object.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker