語言

TryExpression.Update 方法

定義

會建立一個新的表達式,類似這個,但使用提供的子節點。 如果所有子節點相同,則會回傳這個表達式。

public:
 System::Linq::Expressions::TryExpression ^ Update(System::Linq::Expressions::Expression ^ body, System::Collections::Generic::IEnumerable<System::Linq::Expressions::CatchBlock ^> ^ handlers, System::Linq::Expressions::Expression ^ finally, System::Linq::Expressions::Expression ^ fault);
public System.Linq.Expressions.TryExpression Update(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable<System.Linq.Expressions.CatchBlock> handlers, System.Linq.Expressions.Expression finally, System.Linq.Expressions.Expression fault);
public System.Linq.Expressions.TryExpression Update(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable<System.Linq.Expressions.CatchBlock>? handlers, System.Linq.Expressions.Expression? finally, System.Linq.Expressions.Expression? fault);
member this.Update : System.Linq.Expressions.Expression * seq<System.Linq.Expressions.CatchBlock> * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.TryExpression
Public Function Update (body As Expression, handlers As IEnumerable(Of CatchBlock), finally As Expression, fault As Expression) As TryExpression

參數

body
Expression

結果的 Body 性質。

handlers
IEnumerable<CatchBlock>

結果的 Handlers 性質。

finally
Expression

結果的 Finally 性質。

fault
Expression

結果的 Fault 性質。

傳回

若未更改子節點,則使用更新後子節點的表達式。

適用於