System.Reflection.ExceptionHandlingClauseOptions Enumeration

Identifies kinds of exception-handling clauses.

Syntax

[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
public enum ExceptionHandlingClauseOptions

Remarks

To examine the exception-handling clauses in a method, obtain a System.Reflection.MethodInfo object and call the MethodBase.GetMethodBody method to obtain the method body. Use the MethodBody.ExceptionHandlingClauses property to obtain a list of System.Reflection.ExceptionHandlingClause objects.

Note:

Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". The documentation is available online; see tp://go.microsoft.com/fwlink/?LinkID=99212 on MSDN and tp://go.microsoft.com/fwlink/?LinkID=65552 on the Ecma International Web site.

Members

Member NameDescription
Clause

The clause accepts all exceptions that derive from a specified type.

Fault

The clause is executed if an exception occurs, but not on completion of normal control flow.

Filter

The clause contains user-specified instructions that determine whether the exception should be ignored (that is, whether normal execution should resume), be handled by the associated handler, or be passed on to the next clause.

Finally

The clause is executed whenever the try block exits, whether through normal control flow or because of an unhandled exception.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0