다음을 통해 공유


CodeAssignStatement 클래스

정의

단순 대입 문을 나타냅니다.

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

예제

다음 코드는 값 10을 명명i된 정수 변수에 할당하는 값을 만듭니다CodeAssignStatement.

// Assigns the value of the 10 to the integer variable "i".
CodeAssignStatement as1 = new CodeAssignStatement(new CodeVariableReferenceExpression("i"), new CodePrimitiveExpression(10));

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

// i=10;
' Assigns the value 10 to the integer variable "i".
Dim as1 As New CodeAssignStatement(New CodeVariableReferenceExpression("i"), New CodePrimitiveExpression(10))

' A Visual Basic code generator produces the following source code for the preceeding example code:

' i = 10

설명

CodeAssignStatement 개체 값을 다른 개체에 할당하는 문이나 다른 참조에 대한 참조를 나타내는 데 사용할 수 있습니다. 단순 할당 문은 일반적으로 "" value1 = value2 형식이며, 할당되는 개체는 어디에 value1 있으며 value2 할당되고 있습니다. 이 속성은 Left 할당할 개체를 나타냅니다. 이 속성은 Right 할당할 개체를 나타냅니다.

생성자

Name Description
CodeAssignStatement()

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

CodeAssignStatement(CodeExpression, CodeExpression)

지정된 식을 사용하여 클래스의 CodeAssignStatement 새 인스턴스를 초기화합니다.

속성

Name Description
EndDirectives

CodeDirectiveCollection 끝 지시문을 포함하는 개체를 가져옵니다.

(다음에서 상속됨 CodeStatement)
Left

할당할 개체 또는 참조를 나타내는 식을 가져오거나 설정합니다.

LinePragma

코드 문이 발생하는 줄을 가져오거나 설정합니다.

(다음에서 상속됨 CodeStatement)
Right

할당할 개체 또는 참조를 나타내는 식을 가져오거나 설정합니다.

StartDirectives

CodeDirectiveCollection 시작 지시문을 포함하는 개체를 가져옵니다.

(다음에서 상속됨 CodeStatement)
UserData

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

(다음에서 상속됨 CodeObject)

메서드

Name Description
Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상