Expression.MakeCatchBlock Metodo

Definizione

Crea un oggetto CatchBlock che rappresenta un'istruzione catch con gli elementi specificati.

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

Parametri

type
Type

Oggetto Type di Exception che verrà gestito da questo oggetto CatchBlock.

variable
ParameterExpression

Oggetto ParameterExpression che rappresenta un riferimento all'oggetto Exception intercettato da questo gestore.

body
Expression

Corpo dell'istruzione catch.

filter
Expression

Corpo del filtro Exception.

Restituisce

Oggetto CatchBlock creato.

Commenti

type deve essere diverso da Null e corrispondere al tipo di variable (se specificato).

Si applica a