CodeAttachEventStatement Constructor (CodeExpression^, String^, CodeExpression^)
.NET Framework (current version)
Initializes a new instance of the CodeAttachEventStatement class using the specified object containing the event, event name, and event-handler delegate.
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
Available since 1.1
Show: