Expression.MakeCatchBlock Metoda

Definice

Vytvoří reprezentaci CatchBlock příkazu catch se zadanými prvky.

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

Z Type toho se Exception to CatchBlock vyřeší.

variable
ParameterExpression

Představuje ParameterExpression odkaz na Exception objekt zachycený touto obslužnou rutinou.

body
Expression

Tělo příkazu catch.

filter
Expression

Tělo Exception filtru.

Návraty

CatchBlockVytvořeno .

Poznámky

type musí být nenulová a musí odpovídat typu variable (pokud je zadán).

Platí pro