ControlFlowBuilder.AddCatchRegion Methode

Definition

Fügt den Fangbereich hinzu.

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)

Parameter

tryStart
LabelHandle

Beschriftung, die die erste Anweisung des Try-Blocks markiert.

tryEnd
LabelHandle

Beschriftung der Anweisung, die unmittelbar auf den Try-Block folgt.

handlerStart
LabelHandle

Beschriftung, die die erste Anweisung des Handlers markiert.

handlerEnd
LabelHandle

Beschriftung der Anweisung, die unmittelbar auf den Handler folgt.

catchType
EntityHandle

Der Typ der Ausnahme, die abgefangen werden soll: TypeDefinitionHandleoder TypeReferenceHandleTypeSpecificationHandle.

Ausnahmen

Eine Bezeichnung wurde nicht durch einen Anweisungsgeber definiert, dem dieser Generator zugeordnet ist.

-oder-

catchType ist kein gültiger Typhandle.

Eine Bezeichnung weist einen Standardwert auf.

Gilt für: