CodeAttachEventStatement Constructor (CodeExpression, String, CodeExpression)

 

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

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public CodeAttachEventStatement(
	CodeExpression targetObject,
	string eventName,
	CodeExpression listener
)

Parameters

targetObject
Type: System.CodeDom.CodeExpression

A CodeExpression that indicates the object that contains the event.

eventName
Type: System.String

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

listener
Type: System.CodeDom.CodeExpression

A CodeExpression that indicates the new event handler.

.NET Framework
Available since 1.1
Return to top
Show: