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, 5802👍, 0💬
What is the concept of XPOINTER? XPOINTER is used to locate data within XML document. XPOINTER can p...
How To Control Horizontal Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By...
How do you estimate maintenance project and change requests?
How To Set session.gc_maxlifetime Properly? - PHP Script Tips - Understanding and Using Sessions As ...
.NET INTERVIEW QUESTIONS - What is Suspend and Resume in Threading ? It is Similar to Sleep and Inte...