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结果的属性。

返回

如果未更改子级或具有更新的子级的表达式,则此表达式。

适用于