CodeBinaryOperatorExpression 클래스

정의

두 식 간의 이진 연산으로 구성된 식을 나타냅니다.

public ref class CodeBinaryOperatorExpression : System::CodeDom::CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeBinaryOperatorExpression : System.CodeDom.CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeBinaryOperatorExpression = class
    inherit CodeExpression
Public Class CodeBinaryOperatorExpression
Inherits CodeExpression
상속
CodeBinaryOperatorExpression
특성

예제

이 예제에서는 두 숫자를 함께 추가하는 방법을 보여 CodeBinaryOperatorExpression 줍니다.

// This CodeBinaryOperatorExpression represents the addition of 1 and 2.
CodeBinaryOperatorExpression addMethod = new CodeBinaryOperatorExpression(

    // Left operand.
    new CodePrimitiveExpression(1),

    // CodeBinaryOperatorType enumeration value of Add.
    CodeBinaryOperatorType.Add,

    // Right operand.
    new CodePrimitiveExpression(2) );

// A C# code generator produces the following source code for the preceeding example code:

// (1 + 2)
' 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)

설명

CodeBinaryOperatorExpression 이진 연산자를 포함하는 코드 식을 나타내는 데 사용할 수 있습니다. 이진 연산자의 몇 가지 예는 같음(==), 더하기(+) 및 비트(|) 연산자입니다. 열거형은 CodeBinaryOperatorType 많은 언어에서 지원되는 일반적으로 사용되는 기본 이진 연산자 집합을 나타냅니다.

생성자

Name Description
CodeBinaryOperatorExpression()

CodeBinaryOperatorExpression 클래스의 새 인스턴스를 초기화합니다.

CodeBinaryOperatorExpression(CodeExpression, CodeBinaryOperatorType, CodeExpression)

지정된 매개 변수를 사용하여 클래스의 CodeBinaryOperatorExpression 새 인스턴스를 초기화합니다.

속성

Name Description
Left

연산자의 왼쪽에 있는 코드 식을 가져오거나 설정합니다.

Operator

이진 연산자 식에서 연산자를 가져오거나 설정합니다.

Right

연산자 오른쪽에 있는 코드 식을 가져오거나 설정합니다.

UserData

현재 개체에 대한 사용자 정의 데이터를 가져옵니다.

(다음에서 상속됨 CodeObject)

메서드

Name Description
Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보