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 Delegate and what is it used for ?
What is Delegate and what is it used for ?
✍: Guest
Delegate is kinda like a pointer to a function in C++ or like an event handler in Java
You can use it to “multicast†which means running multiple functions in different instances of object already created.
This is useful when you want your objects to “register†to an event raised by another object.
The way it works is the object you are registered to listen to recieves the delegate of the function it is supposed to run in your object, the delegate is then run from it. (if you switch the word delegate for pointer, this would be much simpler)
2013-12-20, 1774👍, 0💬
Popular Posts:
How To Create an Add-to-Bloglines Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News...
What is CodeDom? “CodeDom” is an object model which represents actually a source code. It is designe...
How do we host a WCF service in IIS? Note: - The best to know how to host a WCF in IIS is by doing a...
Do events have return type ? No, events do not have return type.
How do I use forms? The basic syntax for a form is: <FORM ACTION="[URL]">...&l t;/FORM>Wh...