ControlFlowBuilder.AddCatchRegion Methode

Definition

Fügt den Catch-Bereich 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

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

tryEnd
LabelHandle

Bezeichnung, die die Anweisung unmittelbar nach dem Try-Block markiert.

handlerStart
LabelHandle

Bezeichnung, die die erste Anweisung des Handlers markiert.

handlerEnd
LabelHandle

Bezeichnung, die die Anweisung unmittelbar nach dem Handler markiert.

catchType
EntityHandle

Der Typ der Ausnahme, die abgefangen werden soll: TypeDefinitionHandle, TypeReferenceHandle oder TypeSpecificationHandle.

Ausnahmen

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

- oder -

catchType ist kein gültiges Typhandle.

Eine Bezeichnung weist den Standardwert auf.

Gilt für: