Поделиться через


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

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Shared Function MakeBinary ( _
    binaryType As ExpressionType, _
    left As Expression, _
    right As Expression, _
    liftToNull As Boolean, _
    method As MethodInfo _
) As BinaryExpression
public static BinaryExpression MakeBinary(
    ExpressionType binaryType,
    Expression left,
    Expression right,
    bool liftToNull,
    MethodInfo method
)

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentException

binaryType does not correspond to a binary expression node.

ArgumentNullException

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

Remarks

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.

Version Information

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

Platforms

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