What is the difference between delegate and events
What is the difference between delegate and events?
ć Actually events use delegates in bottom. But they add an extra layer on the
delegates, thus forming the publisher and subscriber model.
ć As delegates are function to pointers they can move across any clients. So any of the clients can add or remove events, which can be pretty confusing. But events give the extra protection by adding the layer and making it a publisher and subscriber model.
Just imagine one of your clients doing this
c.XyzCallback = null
This will reset all your delegates to nothing and you have to keep searching where the error is.
2007-10-23, 5770👍, 0💬
What Information Is Needed to Connect SQL*Plus an Oracle Server? - Oracle DBA FAQ - Introduction to ...
What are the core functionalities in XML .NET framework? Can you explain in detail those functionali...
What is the purpose of the wait(), notify(), and notifyAll() methods? The wait(),notify(), and notif...
How does ASP.NET maintain state in between subsequent request ? Refer caching chapter.
Can you explain the fundamentals of and GetLocalResourceObject function...