Expression.Catch Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Crée un représentant une CatchBlock instruction catch.
Surcharges
| Nom | Description |
|---|---|
| Catch(ParameterExpression, Expression) |
Crée une instruction catch représentant une CatchBlock référence à l’objet intercepté Exception à utiliser dans le corps du gestionnaire. |
| Catch(Type, Expression) |
Crée un représentant une CatchBlock instruction catch. |
| Catch(ParameterExpression, Expression, Expression) |
Crée une représentation d’une CatchBlock instruction catch avec un Exception filtre et une référence à l’objet intercepté Exception . |
| Catch(Type, Expression, Expression) |
Crée une instruction catch représentant une CatchBlock instruction catch avec un Exception filtre, mais aucune référence à l’objet intercepté Exception . |
Catch(ParameterExpression, Expression)
Crée une instruction catch représentant une CatchBlock référence à l’objet intercepté Exception à utiliser dans le corps du gestionnaire.
public:
static System::Linq::Expressions::CatchBlock ^ Catch(System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body);
public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body);
static member Catch : System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (variable As ParameterExpression, body As Expression) As CatchBlock
Paramètres
- variable
- ParameterExpression
Représentant ParameterExpression une référence à l’objet Exception intercepté par ce gestionnaire.
- body
- Expression
Corps de l’instruction catch.
Retours
Le fichier créé CatchBlock.
S’applique à
Catch(Type, Expression)
Crée un représentant une CatchBlock instruction catch.
public:
static System::Linq::Expressions::CatchBlock ^ Catch(Type ^ type, System::Linq::Expressions::Expression ^ body);
public static System.Linq.Expressions.CatchBlock Catch(Type type, System.Linq.Expressions.Expression body);
static member Catch : Type * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (type As Type, body As Expression) As CatchBlock
Paramètres
- type
- Type
La Type gestion de Exception ce CatchBlock problème sera assurée.
- body
- Expression
Corps de l’instruction catch.
Retours
Le fichier créé CatchBlock.
Remarques
Les Type données Exception à intercepter peuvent être spécifiées, mais aucune référence à l’objet Exception ne sera disponible pour être utilisée dans le CatchBlock.
S’applique à
Catch(ParameterExpression, Expression, Expression)
Crée une représentation d’une CatchBlock instruction catch avec un Exception filtre et une référence à l’objet intercepté Exception .
public:
static System::Linq::Expressions::CatchBlock ^ Catch(System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member Catch : System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (variable As ParameterExpression, body As Expression, filter As Expression) As CatchBlock
Paramètres
- variable
- ParameterExpression
Représentant ParameterExpression une référence à l’objet Exception intercepté par ce gestionnaire.
- body
- Expression
Corps de l’instruction catch.
- filter
- Expression
Corps du Exception filtre.
Retours
Le fichier créé CatchBlock.
S’applique à
Catch(Type, Expression, Expression)
Crée une instruction catch représentant une CatchBlock instruction catch avec un Exception filtre, mais aucune référence à l’objet intercepté Exception .
public:
static System::Linq::Expressions::CatchBlock ^ Catch(Type ^ type, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock Catch(Type type, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member Catch : Type * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (type As Type, body As Expression, filter As Expression) As CatchBlock
Paramètres
- type
- Type
La Type gestion de Exception ce CatchBlock problème sera assurée.
- body
- Expression
Corps de l’instruction catch.
- filter
- Expression
Corps du Exception filtre.
Retours
Le fichier créé CatchBlock.