CodeEventReferenceExpression クラス
アセンブリ: System (system.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ Public Class CodeEventReferenceExpression Inherits CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] public class CodeEventReferenceExpression : CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] public ref class CodeEventReferenceExpression : public CodeExpression

CodeEventReferenceExpression を使用して、イベントへの参照を表すことができます。
TargetObject プロパティは、イベントを格納しているオブジェクトを指定します。EventName プロパティは、イベントの名前を指定します。

CodeEventReferenceExpression を使用して 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
// 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. CodeEventReferenceExpression^ eventRef1 = gcnew CodeEventReferenceExpression( gcnew CodeThisReferenceExpression,"TestEvent" ); // A C# code generator produces the following source code for the preceeding example code: // this.TestEvent
// Represents a reference to an event. CodeEventReferenceExpression eventRef1 = new CodeEventReferenceExpression(new CodeThisReferenceExpression() , "TestEvent"); // A VJ# code generator produces the following source code for the // preceeding example code: // this.TestEvent

System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeEventReferenceExpression


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- CodeEventReferenceExpression クラスのページへのリンク