Share via


ControlFlowBuilder.AddCatchRegion Metodo

Definizione

Aggiunge l'area catch.

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)

Parametri

tryStart
LabelHandle

Contrassegnare la prima istruzione del blocco try.

tryEnd
LabelHandle

Etichetta che contrassegna l'istruzione immediatamente successiva al blocco try.

handlerStart
LabelHandle

Contrassegnare la prima istruzione del gestore.

handlerEnd
LabelHandle

Contrassegnare immediatamente l'istruzione seguendo il gestore.

catchType
EntityHandle

Tipo di eccezione da intercettare: TypeDefinitionHandle, TypeReferenceHandle o TypeSpecificationHandle.

Eccezioni

Un'etichetta non è stata definita da un codificatore di istruzioni a cui è associato questo generatore.

-oppure-

catchType non è un handle di tipo valido.

Un'etichetta ha il valore predefinito.

Si applica a