LabelExpression.Update(LabelTarget, Expression) 方法

定义

创建一个新的表达式,它类似于此表达式,但使用所提供的子级。Creates a new expression that is like this one, but using the supplied children. 如果所有子级均相同,它将返回此表达式。If all of the children are the same, it will return this expression.

public:
 System::Linq::Expressions::LabelExpression ^ Update(System::Linq::Expressions::LabelTarget ^ target, System::Linq::Expressions::Expression ^ defaultValue);
public System.Linq.Expressions.LabelExpression Update (System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression defaultValue);
public System.Linq.Expressions.LabelExpression Update (System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression? defaultValue);
member this.Update : System.Linq.Expressions.LabelTarget * System.Linq.Expressions.Expression -> System.Linq.Expressions.LabelExpression
Public Function Update (target As LabelTarget, defaultValue As Expression) As LabelExpression

参数

target
LabelTarget

结果的 Target 属性。The Target property of the result.

defaultValue
Expression

结果的 DefaultValue 属性The DefaultValue property of the result

返回

LabelExpression

如果子级未更改,则为此表达式;否则为具有已更新子级的表达式。This expression if no children are changed or an expression with the updated children.

适用于