What Event does over the delegate?
Hai all,
What does a Event does in the C# over the delegate, to my knowledge the delegates are similar to an functional pointer to a function or method whatever you call. Delegare invoke the function byref which it hold, and the event inturn call the delegate assigned when any event or action triggerd.
My question: why can't we straightly invoke a delegate rather than going for a event?
Re: What Event does over the delegate?
An event is basically a list of delegates. Each method that will act as a handler for the event gets added to that list. When the event is to be raised you only have to invoke the event itself to invoke every delegate containing an event handler. If the event mechanism didn't exist you have to invoke each delegate individually.
Re: What Event does over the delegate?