ILGenerator.BeginExceptFilterBlock Method

Definition

Begins an exception block for a filtered exception.

public:
 virtual void BeginExceptFilterBlock();
public virtual void BeginExceptFilterBlock ();
abstract member BeginExceptFilterBlock : unit -> unit
override this.BeginExceptFilterBlock : unit -> unit
Public Overridable Sub BeginExceptFilterBlock ()

Exceptions

The Microsoft intermediate language (MSIL) being generated is not currently in an exception block.

-or-

This ILGenerator belongs to a DynamicMethod.

Remarks

Emits a branch instruction to the end of the current exception block.

If the current ILGenerator is associated with a DynamicMethod object, emitting filtered exception blocks is not supported. DynamicILInfo can be used to construct a dynamic method that uses filtered exception blocks.

Applies to