Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Expression.MakeBinary Method (ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression)

Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

public static BinaryExpression MakeBinary(
	ExpressionType binaryType,
	Expression left,
	Expression right,
	bool liftToNull,
	MethodInfo method,
	LambdaExpression conversion
)

Parameters

binaryType
Type: System.Linq.Expressions.ExpressionType
The ExpressionType that specifies the type of binary operation.
left
Type: System.Linq.Expressions.Expression
An Expression that represents the left operand.
right
Type: System.Linq.Expressions.Expression
An Expression that represents the right operand.
liftToNull
Type: System.Boolean
true to set IsLiftedToNull to true; false to set IsLiftedToNull to false.
method
Type: System.Reflection.MethodInfo
A MethodInfo that specifies the implementing method.
conversion
Type: System.Linq.Expressions.LambdaExpression
A LambdaExpression that represents a type conversion function. This parameter is used only if binaryType is Coalesce or compound assignment..

Return Value

Type: System.Linq.Expressions.BinaryExpression
The BinaryExpression that results from calling the appropriate factory method.

ExceptionCondition
ArgumentException

binaryType does not correspond to a binary expression node.

ArgumentNullException

left or right is null.

The binaryType parameter determines which BinaryExpression factory method this method will call. For example, if binaryType is Subtract, this method invokes Subtract. The liftToNull, method and conversion parameters are ignored if the appropriate factory method does not have a corresponding parameter.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft