Table of Contents

Method ReplaceParameter

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.Legacy.dll

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 Expression

The expression containing the parameter that should be replaced.

fromParameter ParameterExpression

The from parameter.

toExpression Expression

The expression that replaces the parameter.

Returns

Expression

The expression with all occurrences of the parameter replaced.