Expression.Catch Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Erstellt eine CatchBlock catch-Anweisung.
Überlädt
| Name | Beschreibung |
|---|---|
| Catch(ParameterExpression, Expression) |
Erstellt eine CatchBlock catch-Anweisung mit einem Verweis auf das abgefangene Exception Objekt zur Verwendung im Handlertext. |
| Catch(Type, Expression) |
Erstellt eine CatchBlock catch-Anweisung. |
| Catch(ParameterExpression, Expression, Expression) |
Erstellt eine CatchBlock catch-Anweisung mit einem Exception Filter und einem Verweis auf das abgefangene Exception Objekt. |
| Catch(Type, Expression, Expression) |
Erstellt eine CatchBlock catch-Anweisung mit einem Exception Filter, aber keinen Verweis auf das abgefangene Exception Objekt. |
Catch(ParameterExpression, Expression)
Erstellt eine CatchBlock catch-Anweisung mit einem Verweis auf das abgefangene Exception Objekt zur Verwendung im Handlertext.
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
Parameter
- variable
- ParameterExpression
Ein ParameterExpression Verweis auf das Objekt, das Exception von diesem Handler abgefangen wird.
- body
- Expression
Der Textkörper der Catch-Anweisung.
Gibt zurück
Die erstellte CatchBlock.
Gilt für:
Catch(Type, Expression)
Erstellt eine CatchBlock catch-Anweisung.
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
Parameter
- type
- Type
Dies TypeExceptionCatchBlock wird behandelt.
- body
- Expression
Der Textkörper der Catch-Anweisung.
Gibt zurück
Die erstellte CatchBlock.
Hinweise
Der Type zu erfangende Exception Wert kann angegeben werden, aber kein Verweis auf das Objekt ist für die Exception Verwendung in der CatchBlock.
Gilt für:
Catch(ParameterExpression, Expression, Expression)
Erstellt eine CatchBlock catch-Anweisung mit einem Exception Filter und einem Verweis auf das abgefangene Exception Objekt.
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
Parameter
- variable
- ParameterExpression
Ein ParameterExpression Verweis auf das Objekt, das Exception von diesem Handler abgefangen wird.
- body
- Expression
Der Textkörper der Catch-Anweisung.
- filter
- Expression
Der Textkörper des Exception Filters.
Gibt zurück
Die erstellte CatchBlock.
Gilt für:
Catch(Type, Expression, Expression)
Erstellt eine CatchBlock catch-Anweisung mit einem Exception Filter, aber keinen Verweis auf das abgefangene Exception Objekt.
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
Parameter
- type
- Type
Dies TypeExceptionCatchBlock wird behandelt.
- body
- Expression
Der Textkörper der Catch-Anweisung.
- filter
- Expression
Der Textkörper des Exception Filters.
Gibt zurück
Die erstellte CatchBlock.