Expression.MakeBinary Expression.MakeBinary Expression.MakeBinary Expression.MakeBinary Method

定義

適切なファクトリ メソッドを呼び出すことにより、BinaryExpression を作成します。Creates a BinaryExpression by calling the appropriate factory method.

オーバーロード

MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression)

適切なファクトリ メソッドを呼び出すことにより、左オペランドと右オペランドを指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.

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

適切なファクトリ メソッドを呼び出すことにより、左オペランド、右オペランド、および実装メソッドを指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.

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

適切なファクトリ メソッドを呼び出すことにより、左オペランド、右オペランド、実装メソッド、および型変換関数を指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.

MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression)

適切なファクトリ メソッドを呼び出すことにより、左オペランドと右オペランドを指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.

public:
 static System::Linq::Expressions::BinaryExpression ^ MakeBinary(System::Linq::Expressions::ExpressionType binaryType, System::Linq::Expressions::Expression ^ left, System::Linq::Expressions::Expression ^ right);
public static System.Linq.Expressions.BinaryExpression MakeBinary (System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right);
static member MakeBinary : System.Linq.Expressions.ExpressionType * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.BinaryExpression
Public Shared Function MakeBinary (binaryType As ExpressionType, left As Expression, right As Expression) As BinaryExpression

パラメーター

binaryType
ExpressionType ExpressionType ExpressionType ExpressionType

二項演算の型を指定する ExpressionTypeThe ExpressionType that specifies the type of binary operation.

left
Expression Expression Expression Expression

左オペランドを表す ExpressionAn Expression that represents the left operand.

right
Expression Expression Expression Expression

右オペランドを表す ExpressionAn Expression that represents the right operand.

戻り値

適切なファクトリ メソッドを呼び出した結果得られる BinaryExpressionThe BinaryExpression that results from calling the appropriate factory method.

例外

binaryType は、二項式ノードには対応していません。binaryType does not correspond to a binary expression node.

left または rightnull です。left or right is null.

次の例では、使用する方法、MakeBinary(ExpressionType, Expression, Expression)を作成する方法、BinaryExpressionから別の 1 つの数値の減算を表します。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.

// Create a BinaryExpression that represents subtracting 14 from 53.
System.Linq.Expressions.BinaryExpression binaryExpression =
    System.Linq.Expressions.Expression.MakeBinary(
        System.Linq.Expressions.ExpressionType.Subtract,
        System.Linq.Expressions.Expression.Constant(53),
        System.Linq.Expressions.Expression.Constant(14));

Console.WriteLine(binaryExpression.ToString());

// This code produces the following output:
//
// (53 - 14)
' Create a BinaryExpression that represents subtracting 14 from 53.
Dim binaryExpression As System.Linq.Expressions.BinaryExpression = _
    System.Linq.Expressions.Expression.MakeBinary( _
        System.Linq.Expressions.ExpressionType.Subtract, _
        System.Linq.Expressions.Expression.Constant(53), _
        System.Linq.Expressions.Expression.Constant(14))

Console.WriteLine(binaryExpression.ToString())

' This code produces the following output:
'
' (53 - 14)

注釈

binaryTypeパラメーターを指定するBinaryExpressionファクトリ メソッドがこのメソッドを呼び出します。The binaryType parameter determines which BinaryExpression factory method this method calls. たとえば場合、binaryTypeSubtract、このメソッドはSubtractします。For example, if binaryType is Subtract, this method invokes Subtract.

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

適切なファクトリ メソッドを呼び出すことにより、左オペランド、右オペランド、および実装メソッドを指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.

public:
 static System::Linq::Expressions::BinaryExpression ^ MakeBinary(System::Linq::Expressions::ExpressionType binaryType, System::Linq::Expressions::Expression ^ left, System::Linq::Expressions::Expression ^ right, bool liftToNull, System::Reflection::MethodInfo ^ method);
public static System.Linq.Expressions.BinaryExpression MakeBinary (System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method);
static member MakeBinary : System.Linq.Expressions.ExpressionType * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * bool * System.Reflection.MethodInfo -> System.Linq.Expressions.BinaryExpression
Public Shared Function MakeBinary (binaryType As ExpressionType, left As Expression, right As Expression, liftToNull As Boolean, method As MethodInfo) As BinaryExpression

パラメーター

binaryType
ExpressionType ExpressionType ExpressionType ExpressionType

二項演算の型を指定する ExpressionTypeThe ExpressionType that specifies the type of binary operation.

left
Expression Expression Expression Expression

左オペランドを表す ExpressionAn Expression that represents the left operand.

right
Expression Expression Expression Expression

右オペランドを表す ExpressionAn Expression that represents the right operand.

liftToNull
Boolean Boolean Boolean Boolean

trueIsLiftedToNull に設定する場合は truefalseIsLiftedToNull に設定する場合は falsetrue to set IsLiftedToNull to true; false to set IsLiftedToNull to false.

method
MethodInfo MethodInfo MethodInfo MethodInfo

実装メソッドを指定する MethodInfoA MethodInfo that specifies the implementing method.

戻り値

適切なファクトリ メソッドを呼び出した結果得られる BinaryExpressionThe BinaryExpression that results from calling the appropriate factory method.

例外

binaryType は、二項式ノードには対応していません。binaryType does not correspond to a binary expression node.

left または rightnull です。left or right is null.

注釈

binaryTypeパラメーターを指定するBinaryExpressionこのメソッドの呼び出しはファクトリ メソッド。The binaryType parameter determines which BinaryExpression factory method this method will call. たとえば場合、binaryTypeSubtract、このメソッドはSubtractします。For example, if binaryType is Subtract, this method invokes Subtract. liftToNullmethod適切なファクトリ メソッドに対応するパラメーターがない場合、パラメーターは無視されます。The liftToNull and method parameters are ignored if the appropriate factory method does not have a corresponding parameter.

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

適切なファクトリ メソッドを呼び出すことにより、左オペランド、右オペランド、実装メソッド、および型変換関数を指定して、BinaryExpression を作成します。Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.

public:
 static System::Linq::Expressions::BinaryExpression ^ MakeBinary(System::Linq::Expressions::ExpressionType binaryType, System::Linq::Expressions::Expression ^ left, System::Linq::Expressions::Expression ^ right, bool liftToNull, System::Reflection::MethodInfo ^ method, System::Linq::Expressions::LambdaExpression ^ conversion);
public static System.Linq.Expressions.BinaryExpression MakeBinary (System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion);
static member MakeBinary : System.Linq.Expressions.ExpressionType * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * bool * System.Reflection.MethodInfo * System.Linq.Expressions.LambdaExpression -> System.Linq.Expressions.BinaryExpression
Public Shared Function MakeBinary (binaryType As ExpressionType, left As Expression, right As Expression, liftToNull As Boolean, method As MethodInfo, conversion As LambdaExpression) As BinaryExpression

パラメーター

binaryType
ExpressionType ExpressionType ExpressionType ExpressionType

二項演算の型を指定する ExpressionTypeThe ExpressionType that specifies the type of binary operation.

left
Expression Expression Expression Expression

左オペランドを表す ExpressionAn Expression that represents the left operand.

right
Expression Expression Expression Expression

右オペランドを表す ExpressionAn Expression that represents the right operand.

liftToNull
Boolean Boolean Boolean Boolean

trueIsLiftedToNull に設定する場合は truefalseIsLiftedToNull に設定する場合は falsetrue to set IsLiftedToNull to true; false to set IsLiftedToNull to false.

method
MethodInfo MethodInfo MethodInfo MethodInfo

実装メソッドを指定する MethodInfoA MethodInfo that specifies the implementing method.

conversion
LambdaExpression LambdaExpression LambdaExpression LambdaExpression

型変換関数を表す LambdaExpressionA LambdaExpression that represents a type conversion function. このパラメーターは、binaryTypeCoalesce または複合割り当てである場合にのみ使用されます。This parameter is used only if binaryType is Coalesce or compound assignment.

戻り値

適切なファクトリ メソッドを呼び出した結果得られる BinaryExpressionThe BinaryExpression that results from calling the appropriate factory method.

例外

binaryType は、二項式ノードには対応していません。binaryType does not correspond to a binary expression node.

left または rightnull です。left or right is null.

注釈

binaryTypeパラメーターを指定するBinaryExpressionこのメソッドの呼び出しはファクトリ メソッド。The binaryType parameter determines which BinaryExpression factory method this method will call. たとえば場合、binaryTypeSubtract、このメソッドはSubtractします。For example, if binaryType is Subtract, this method invokes Subtract. liftToNullmethodconversion適切なファクトリ メソッドに対応するパラメーターがない場合、パラメーターは無視されます。The liftToNull, method and conversion parameters are ignored if the appropriate factory method does not have a corresponding parameter.

適用対象