Expression.MakeCatchBlock Metoda

Definicja

Tworzy reprezentację CatchBlock instrukcji catch z określonymi elementami.

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

Parametry

type
Type

Ta funkcja będzie obsługiwana TypeExceptionCatchBlock .

variable
ParameterExpression

Reprezentujący ParameterExpression odwołanie do obiektu przechwyconego Exception przez tę procedurę obsługi.

body
Expression

Treść instrukcji catch.

filter
Expression

Treść filtru Exception .

Zwraca

Utworzony element CatchBlock.

Uwagi

type musi mieć wartość inną niż null i odpowiadać typowi variable (jeśli jest podany).

Dotyczy