Export (0) Print
Expand All

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

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

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

static member MakeBinary : 
        binaryType:ExpressionType * 
        left:Expression * 
        right:Expression * 
        liftToNull:bool * 
        method:MethodInfo -> BinaryExpression

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.

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 a null reference (Nothing in Visual Basic).

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft