public delegate void EventHandler(object sender, EventArgs e);
public class Button: Control
{
public event EventHandler Click;
protected void OnClick(EventArgs e) {
if (Click != null) Click(this, e);
}
}
The book explains the code above in the following way:
The OnClick method in the Button class "raises" the Click event. The notion of raising an event is precisely equivalent to invoking the delegate represented by the event — thus, there are no special language constructs for raising events. Note that the delegate invocation is preceded by a check that ensures the delegate is non-null.
Why does it imply that there's only one delegate in the event when there's a delegate instance for every event-handler? An instance is an instance and an event can contain many delegate instances that connect to actual methods.
I'd greatly appreciate if someone can make sense of this paragraph for me.