CodeEventReferenceExpression クラス
定義
イベントへの参照を表します。Represents a reference to an event.
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 という名前のイベントを参照する方法を示します。The following example demonstrates use of CodeEventReferenceExpression to reference an event named 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 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 は、イベントへの参照を表すために使用できます。CodeEventReferenceExpression can be used to represent a reference to an event.
プロパティは、 TargetObject イベントを含むオブジェクトを指定します。The TargetObject property specifies the object that contains the event. プロパティは、 EventName イベントの名前を指定します。The EventName property specifies the name of the event.
コンストラクター
CodeEventReferenceExpression() |
CodeEventReferenceExpression クラスの新しいインスタンスを初期化します。Initializes a new instance of the CodeEventReferenceExpression class. |
CodeEventReferenceExpression(CodeExpression, String) |
対象オブジェクトとイベント名を指定して、CodeEventReferenceExpression クラスの新しいインスタンスを初期化します。Initializes a new instance of the CodeEventReferenceExpression class using the specified target object and event name. |
プロパティ
EventName |
イベントの名前を取得または設定します。Gets or sets the name of the event. |
TargetObject |
イベントを格納するオブジェクトを取得または設定します。Gets or sets the object that contains the event. |
UserData |
現在のオブジェクトのユーザー定義可能なデータを取得します。Gets the user-definable data for the current object. (継承元 CodeObject) |
メソッド
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetType() |
現在のインスタンスの Type を取得します。Gets the Type of the current instance. (継承元 Object) |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
ToString() |
現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object. (継承元 Object) |