Expression.MakeCatchBlock Methode

Definition

Erstellt eine CatchBlock catch-Anweisung mit den angegebenen Elementen.

public:
 static System::Linq::Expressions::CatchBlock ^ MakeCatchBlock(Type ^ type, System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock MakeCatchBlock(Type type, System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member MakeCatchBlock : Type * System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function MakeCatchBlock (type As Type, variable As ParameterExpression, body As Expression, filter As Expression) As CatchBlock

Parameter

type
Type

Dies TypeExceptionCatchBlock wird behandelt.

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.

Hinweise

type muss ungleich NULL sein und dem Typ von variable (sofern angegeben) entsprechen.

Gilt für: