Expression.TryFinally(Expression, Expression) 方法

定义

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

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

参数

body
Expression

try 块的主体。

finally
Expression

finally 块的主体。

返回

创建的 TryExpression

适用于