Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MakeBinary Method (ExpressionType, Expression, Expression)

Expression::MakeBinary Method (ExpressionType, Expression, Expression)

Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.

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

public:
static BinaryExpression^ MakeBinary(
	ExpressionType binaryType, 
	Expression^ left, 
	Expression^ right
)

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.

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 nullptr.

The binaryType parameter determines which BinaryExpression factory method this method calls. For example, if binaryType is Subtract, this method invokes Subtract.

The following example demonstrates how to use the MakeBinary(ExpressionType, Expression, Expression) method to create a BinaryExpression that represents the subtraction of one number from another.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft