Expression.TryFault(Expression, Expression) 方法

定义

创建一个表示 try 块的 TryExpression,该 try 块包含一个 fault 块,但不包含 catch 语句。

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

适用于