Share via


SwitchExpression.Update 方法

定義

建立類似這個運算式的新運算式,但使用提供的子系。 如果所有子系都相同,則會傳回這個運算式。

public:
 System::Linq::Expressions::SwitchExpression ^ Update(System::Linq::Expressions::Expression ^ switchValue, System::Collections::Generic::IEnumerable<System::Linq::Expressions::SwitchCase ^> ^ cases, System::Linq::Expressions::Expression ^ defaultBody);
public System.Linq.Expressions.SwitchExpression Update (System.Linq.Expressions.Expression switchValue, System.Collections.Generic.IEnumerable<System.Linq.Expressions.SwitchCase> cases, System.Linq.Expressions.Expression defaultBody);
public System.Linq.Expressions.SwitchExpression Update (System.Linq.Expressions.Expression switchValue, System.Collections.Generic.IEnumerable<System.Linq.Expressions.SwitchCase>? cases, System.Linq.Expressions.Expression? defaultBody);
member this.Update : System.Linq.Expressions.Expression * seq<System.Linq.Expressions.SwitchCase> * System.Linq.Expressions.Expression -> System.Linq.Expressions.SwitchExpression
Public Function Update (switchValue As Expression, cases As IEnumerable(Of SwitchCase), defaultBody As Expression) As SwitchExpression

參數

switchValue
Expression

結果的 SwitchValue 屬性。

cases
IEnumerable<SwitchCase>

結果的 Cases 屬性。

defaultBody
Expression

結果的 DefaultBody 屬性。

傳回

如果未變更任何子系,則為這個運算式;否則為已更新子系的運算式。

適用於