Expression.MakeCatchBlock Metod

Definition

Skapar en CatchBlock som representerar en catch-instruktion med de angivna elementen.

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

Parametrar

type
Type

Exception Av Type detta CatchBlock kommer att hantera.

variable
ParameterExpression

En ParameterExpression som representerar en referens till objektet som Exception fångas av den här hanteraren.

body
Expression

Brödtexten i catch-instruktionen.

filter
Expression

Filtrets Exception brödtext.

Returer

Den skapade CatchBlock.

Kommentarer

type måste vara icke-null och matcha typen av variable (om den tillhandahålls).

Gäller för