다음을 통해 공유


CodeEventReferenceExpression 클래스

정의

이벤트에 대한 참조를 나타냅니다.

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

예제

다음 예제에서는 TestEvent라는 이벤트를 참조하는 데 사용하는 CodeEventReferenceExpression 방법을 보여 줍니다.

// Represents a reference to an event.
CodeEventReferenceExpression eventRef1 = new CodeEventReferenceExpression( new CodeThisReferenceExpression(), "TestEvent" );

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

//        this.TestEvent
' Represents a reference to an event.
Dim eventRef1 As New CodeEventReferenceExpression(New CodeThisReferenceExpression(), "TestEvent")

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

'       Me.TestEvent

설명

CodeEventReferenceExpression 는 이벤트에 대한 참조를 나타내는 데 사용할 수 있습니다.

이 속성은 TargetObject 이벤트를 포함하는 개체를 지정합니다. 이 속성은 EventName 이벤트의 이름을 지정합니다.

생성자

Name Description
CodeEventReferenceExpression()

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

CodeEventReferenceExpression(CodeExpression, String)

지정된 대상 개체 및 이벤트 이름을 사용하여 클래스의 CodeEventReferenceExpression 새 인스턴스를 초기화합니다.

속성

Name Description
EventName

이벤트의 이름을 가져오거나 설정합니다.

TargetObject

이벤트를 포함하는 개체를 가져오거나 설정합니다.

UserData

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

(다음에서 상속됨 CodeObject)

메서드

Name Description
Equals(Object)

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

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

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

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상