What is "events"

An event is a form of a class to provide notifications to customers in that class when something interesting happens to an object. The most familiar use for events is in graphical user interfaces, usually the classes representing the controls in the interface have events that are notified when the user does something for the control (for example, click a button).

Events, however, do not need to be used only for graphical interfaces. Events provide a general and useful way for objects to signal state changes that may be useful to consumers of this object. Events are an important element in creating classes that can be reused in a large number of different programs.

Events are declared using delegates, from English delegates. A delegated object encapsulates a method so that it can be called anonymously. An event is a form of class to allow consumers to provide delegates for methods that must be called when the event occurs. When the event occurs, the delegate(s) provided by its consumers are called.

References