Skip to content

M_CodeJam_Expressions_ExpressionExtensions_ReplaceParameters_1

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

ExpressionExtensions.ReplaceParameters Method (LambdaExpression, Expression[])

Replaces lambda body parameters and returns modified body.

Namespace: CodeJam.Expressions
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static Expression ReplaceParameters(
	this LambdaExpression lambda,
	params Expression[] exprToReplaceParameter
)

VB

<ExtensionAttribute>
Public Shared Function ReplaceParameters ( 
	lambda As LambdaExpression,
	ParamArray exprToReplaceParameter As Expression()
) As Expression

F#

[<ExtensionAttribute>]
static member ReplaceParameters : 
        lambda : LambdaExpression * 
        exprToReplaceParameter : Expression[] -> Expression 

Parameters

 

lambda
Type: System.Linq.Expressions.LambdaExpression
Original lambda.
exprToReplaceParameter
Type: System.Linq.Expressions.Expression[]
Expressions to replace lambda pameters.

Return Value

Type: Expression
Modified body.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type LambdaExpression. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ExpressionExtensions Class
ReplaceParameters Overload
CodeJam.Expressions Namespace

Clone this wiki locally