Επεξεργασία

Κοινή χρήση μέσω


CodeAttachEventStatement Constructors

Definition

Initializes a new instance of the CodeAttachEventStatement class.

Overloads

CodeAttachEventStatement()

Initializes a new instance of the CodeAttachEventStatement class.

CodeAttachEventStatement(CodeEventReferenceExpression, CodeExpression)

Initializes a new instance of the CodeAttachEventStatement class using the specified event and delegate.

CodeAttachEventStatement(CodeExpression, String, CodeExpression)

Initializes a new instance of the CodeAttachEventStatement class using the specified object containing the event, event name, and event-handler delegate.

CodeAttachEventStatement()

Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs

Initializes a new instance of the CodeAttachEventStatement class.

public:
 CodeAttachEventStatement();
public CodeAttachEventStatement ();
Public Sub New ()

Applies to

CodeAttachEventStatement(CodeEventReferenceExpression, CodeExpression)

Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs

Initializes a new instance of the CodeAttachEventStatement class using the specified event and delegate.

public:
 CodeAttachEventStatement(System::CodeDom::CodeEventReferenceExpression ^ eventRef, System::CodeDom::CodeExpression ^ listener);
public CodeAttachEventStatement (System.CodeDom.CodeEventReferenceExpression eventRef, System.CodeDom.CodeExpression listener);
new System.CodeDom.CodeAttachEventStatement : System.CodeDom.CodeEventReferenceExpression * System.CodeDom.CodeExpression -> System.CodeDom.CodeAttachEventStatement
Public Sub New (eventRef As CodeEventReferenceExpression, listener As CodeExpression)

Parameters

eventRef
CodeEventReferenceExpression

A CodeEventReferenceExpression that indicates the event to attach an event handler to.

listener
CodeExpression

A CodeExpression that indicates the new event handler.

See also

Applies to

CodeAttachEventStatement(CodeExpression, String, CodeExpression)

Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs
Source:
CodeAttachEventStatement.cs

Initializes a new instance of the CodeAttachEventStatement class using the specified object containing the event, event name, and event-handler delegate.

public:
 CodeAttachEventStatement(System::CodeDom::CodeExpression ^ targetObject, System::String ^ eventName, System::CodeDom::CodeExpression ^ listener);
public CodeAttachEventStatement (System.CodeDom.CodeExpression targetObject, string eventName, System.CodeDom.CodeExpression listener);
new System.CodeDom.CodeAttachEventStatement : System.CodeDom.CodeExpression * string * System.CodeDom.CodeExpression -> System.CodeDom.CodeAttachEventStatement
Public Sub New (targetObject As CodeExpression, eventName As String, listener As CodeExpression)

Parameters

targetObject
CodeExpression

A CodeExpression that indicates the object that contains the event.

eventName
String

The name of the event to attach an event handler to.

listener
CodeExpression

A CodeExpression that indicates the new event handler.

Applies to