共用方式為


Expression.TryFinally(Expression, Expression) 方法

定義

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

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

適用於