You can read part one of this topic here. This part presents a simple example of how to publish and subscribe to an event that does not send data. Note that events such as button clicks, that generate no data can avail of the EventHandler delegate provided in the class library.

Publish an Event - Five Steps:

* Define type inherited from EventArgs to contain any event-related data. If there is no data, use pre-defined EventArgs type

* Define delegate that specifies prototype of event handler. If the events generates no data, use pre-defined EventHandler delegate