Expression.MakeCatchBlock 方法

定義

建立 CatchBlock,代表含指定之項目的 catch 陳述式。

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

參數

type
Type

這個 Type 將處理之 ExceptionCatchBlock

variable
ParameterExpression

ParameterExpression,代表這個處理常式所攔截 Exception 物件的參考。

body
Expression

catch 陳述式的主體。

filter
Expression

Exception 篩選條件的主體。

傳回

CatchBlock

建立的 CatchBlock

備註

type 如果提供) , variable 則必須為非 Null,且符合 (的類型。

適用於