Expression.MakeCatchBlock Método

Definición

Crea un objeto CatchBlock que representa una instrucción Catch con los 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

Type de Exception que este CatchBlock controlará.

variable
ParameterExpression

Objeto ParameterExpression que representa una referencia al objeto Exception detectado por este controlador.

body
Expression

Cuerpo de la instrucción Catch.

filter
Expression

Cuerpo del filtro Exception.

Devoluciones

Objeto CatchBlock creado.

Comentarios

type debe ser distinto de NULL y coincidir con el tipo de variable (si se proporciona).

Se aplica a