Expression.MakeCatchBlock(Type, ParameterExpression, Expression, Expression) Expression.MakeCatchBlock(Type, ParameterExpression, Expression, Expression) Expression.MakeCatchBlock(Type, ParameterExpression, Expression, Expression) Method

Definition

Creates a CatchBlock representing a catch statement with the specified elements.

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

Parameters

type
Type Type Type

The Type of Exception this CatchBlock will handle.

variable
ParameterExpression ParameterExpression ParameterExpression

A ParameterExpression representing a reference to the Exception object caught by this handler.

body
Expression Expression Expression

The body of the catch statement.

filter
Expression Expression Expression

The body of the Exception filter.

Returns

Remarks

type must be non-null and match the type of variable (if it is supplied).

Applies to