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
nodeExpressionThe expression containing the parameter that should be replaced.
fromParameterParameterExpressionThe from parameter.
toExpressionExpressionThe expression that replaces the parameter.
Returns
- Expression
The expression with all occurrences of the parameter replaced.