संपादित करें

इसके माध्यम से साझा किया गया


ControlFlowBuilder.AddCatchRegion Method

Definition

Adds catch region.

public:
 void AddCatchRegion(System::Reflection::Metadata::Ecma335::LabelHandle tryStart, System::Reflection::Metadata::Ecma335::LabelHandle tryEnd, System::Reflection::Metadata::Ecma335::LabelHandle handlerStart, System::Reflection::Metadata::Ecma335::LabelHandle handlerEnd, System::Reflection::Metadata::EntityHandle catchType);
public void AddCatchRegion (System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd, System.Reflection.Metadata.EntityHandle catchType);
member this.AddCatchRegion : System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.EntityHandle -> unit
Public Sub AddCatchRegion (tryStart As LabelHandle, tryEnd As LabelHandle, handlerStart As LabelHandle, handlerEnd As LabelHandle, catchType As EntityHandle)

Parameters

tryStart
LabelHandle

Label marking the first instruction of the try block.

tryEnd
LabelHandle

Label marking the instruction immediately following the try block.

handlerStart
LabelHandle

Label marking the first instruction of the handler.

handlerEnd
LabelHandle

Label marking the instruction immediately following the handler.

catchType
EntityHandle

The type of exception to be caught: TypeDefinitionHandle, TypeReferenceHandle or TypeSpecificationHandle.

Exceptions

A label was not defined by an instruction encoder this builder is associated with.

-or-

catchType is not a valid type handle.

A label has default value.

Applies to