Share via


ReplacingExpressionVisitor.Replace(Expression, Expression, Expression) Method

Definition

Replaces one expression with another in given expression tree.

public static System.Linq.Expressions.Expression Replace (System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression replacement, System.Linq.Expressions.Expression tree);
static member Replace : System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.Expression
Public Shared Function Replace (original As Expression, replacement As Expression, tree As Expression) As Expression

Parameters

original
Expression

The expression to replace.

replacement
Expression

The expression to be used as replacement.

tree
Expression

The expression tree in which replacement is going to be performed.

Returns

An expression tree with replacements made.

Applies to