Method ReplaceParameter
ReplaceParameter(Expression, ParameterExpression, Expression)
Replaces all occurences of one parameter with a different parameter.
public static Expression ReplaceParameter(Expression node, ParameterExpression fromParameter, Expression toExpression)
Parameters
node
ExpressionThe expression containing the parameter that should be replaced.
fromParameter
ParameterExpressionThe from parameter.
toExpression
ExpressionThe expression that replaces the parameter.
Returns
- Expression
The expression with all occurrences of the parameter replaced.