Expression.MakeCatchBlock Methode

Definition

Erstellt einen CatchBlock, der eine Catch-Anweisung mit den angegebenen Elementen darstellt.

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);
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

Der Type von Exception, der von diesem CatchBlock behandelt wird.

variable
ParameterExpression

Eine ParameterExpression, die einen Verweis auf das von diesem Handler aufgefangene Exception-Objekt darstellt.

body
Expression

Der Text der Catch-Anweisung.

filter
Expression

Der Text des Exception-Filters.

Gibt zurück

Der erstellte CatchBlock.

Hinweise

type muss nicht NULL sein und dem Typ von variable entsprechen (wenn er angegeben wird).

Gilt für: