Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the difference between delegate and events
What is the difference between delegate and events?
✍: Guest
ã 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, 7080👍, 0💬
Popular Posts:
What is the quickest sorting method to use? The answer depends on what you mean by quickest. For mos...
.NET INTERVIEW QUESTIONS - Where do you specify session state mode in ASP.NET ? The following code e...
What Are the Parameter Modes Supported by PL/SQL? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
How do we create DCOM object in VB6? Using the CreateObject method you can create a DCOM object. You...
How To Create an Add-to-Google-Reader Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS ...