Export (0) Print
Expand All

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
Assembly:  System.Core (in System.Core.dll)

static member MakeBinary : 
        binaryType:ExpressionType * 
        left:Expression * 
        right:Expression -> BinaryExpression


Type: System.Linq.Expressions.ExpressionType

The ExpressionType that specifies the type of binary operation.

Type: System.Linq.Expressions.Expression

An Expression that represents the left operand.

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.


binaryType does not correspond to a binary expression node.


left or right is a null reference (Nothing in Visual Basic).

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.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

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

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft