Difference between events and delegates ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhay ShankerPosted Aug 19, 2015, 11:59 AM
Sumit JoshiPosted Aug 19, 2015, 8:53 AM
a class is almost the same as adding a public multicast delegate field. In both
cases, subscriber objects can register for notifications, and in both cases the
publisher object can send notifications to the subscribers. However, a public
multicast delegate has the undesirable property that external objects can
invoke the delegate, something we'd normally want to restrict to the
publisher. Hence events - an event adds public methods to the containing
class to add and remove receivers, but does not make the invocation
mechanism public.
Vaikesh K PPosted Aug 19, 2015, 8:38 AM
Check these articles
Rajeesh MenothPosted Aug 19, 2015, 8:31 AM