共用方式為


Expression.TryFault(Expression, Expression) 方法

定義

建立 TryExpression,代表含 fault 區塊但不含任何 catch 陳述式的 try 區塊。

public:
 static System::Linq::Expressions::TryExpression ^ TryFault(System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ fault);
public static System.Linq.Expressions.TryExpression TryFault (System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression fault);
public static System.Linq.Expressions.TryExpression TryFault (System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression? fault);
static member TryFault : System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.TryExpression
Public Shared Function TryFault (body As Expression, fault As Expression) As TryExpression

參數

body
Expression

try 區塊的主體。

fault
Expression

fault 區塊的主體。

傳回

建立的 TryExpression

適用於