Click here to Skip to main content
16,016,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why would I use an event when the same objective can be achieved using merely a delegate?
Posted

1 solution

You can find a detailed answer to this question in this[^] thread. Pay particular attention to the answer given by SA Kryukov. It's probably the most comprehensive answer you'll get.
 
Share this answer
 
Comments
Subir Saw 6-Mar-12 6:41am    
Hi Pete,
Is it just that, an access modifier??
Pete O'Hanlon 6-Mar-12 7:09am    
No - As SA explains, the benefit of an event is that it imposes limitations. These limitations are intended to ensure that there is a predictability to the action. Suppose that you were to allow an event to be invoked from a derived class - there is a real possibility here that this would lead to an unpredictable result.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900