Expression.MakeCatchBlock Método

Definição

Cria um CatchBlock que representa uma instrução catch com os elementos especificados.

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

Parâmetros

type
Type

O Type de Exception que esse CatchBlock tratará.

variable
ParameterExpression

Uma ParameterExpression que representa uma referência para o objeto Exception capturado por este manipulador.

body
Expression

O corpo da instrução catch.

filter
Expression

O corpo do filtro Exception.

Retornos

O CatchBlock criado.

Comentários

type deve ser não nulo e corresponder ao tipo de variable (se for fornecido).

Aplica-se a