CodeBinaryOperatorExpression Class
Represents an expression that consists of a binary operation between two expressions.
Assembly: System (in System.dll)
CodeBinaryOperatorExpression can be used to represent code expressions that include a binary operator. Some examples of binary operators are equality (==), addition (+), and bitwise (|) operators. The CodeBinaryOperatorType enumeration represents a set of basic, commonly used binary operators that are supported in many languages.
This example demonstrates use of a CodeBinaryOperatorExpression to add two numbers together.
' This CodeBinaryOperatorExpression represents the addition of 1 and 2. Dim addMethod As New CodeBinaryOperatorExpression( _ New CodePrimitiveExpression(1), _ CodeBinaryOperatorType.Add, _ New CodePrimitiveExpression(2) ) ' A Visual Basic code generator produces the following source code for the preceeding example code: ' (1 + 2)
System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeBinaryOperatorExpression
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.