Explain to me delegates please!!!!!!!!!!!!!!!!!!!!!!
To me it seems its just like method.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 22, 2012, 1:27 AM EDT
The way I tend to think of a delegate is as a list of methods with the same signature all of which can be invoked together by invoking the delegate itself.
Kunal VaishyaRank #990 · 2K reputationPosted Apr 20, 2012, 7:02 PM EDT
http://www.dotnetperls.com/delegate
SenthilkumarRank #387 · 6.5K reputationPosted Apr 20, 2012, 8:32 PM EDT
For more info:
http://www.c-sharpcorner.com/Forums/Thread/169396/
http://geekswithblogs.net/joycsharp/archive/2008/02/15/simple-c-delegate-sample.aspx
http://www.codeproject.com/Articles/11657/Understanding-Delegates-in-C
VulpesRank #55 · 29.2K reputationPosted Apr 21, 2012, 5:17 AM EDT
Satyapriya NayakRank #47 · 31.5K reputationPosted Apr 21, 2012, 5:39 AM EDT
Please refer Our recommended articles
http://www.c-sharpcorner.com/UploadFile/72d20e/concept-of-delegate-in-C-Sharp2/
http://www.c-sharpcorner.com/uploadfile/6897bc/delegates-part-i/default.aspx
http://www.c-sharpcorner.com/uploadfile/6897bc/delegates-part-2/default.aspx
http://www.c-sharpcorner.com/UploadFile/Ashush/delegates-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/fbulovic/ExploringDelegates11092005000646AM/ExploringDelegates.aspx
http://www.c-sharpcorner.com/UploadFile/pathumfer/learn-basics-of-delegates-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/rmcochran/delegateStrategy06142007210551PM/delegateStrategy.aspx
Thanks
Prime bRank #2,035 · 712 reputationPosted Apr 21, 2012, 12:44 PM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 21, 2012, 2:56 PM EDT
Prime bRank #2,035 · 712 reputationPosted Apr 21, 2012, 4:11 PM EDT
Prime bRank #2,035 · 712 reputationPosted Apr 22, 2012, 10:29 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 22, 2012, 12:05 PM EDT
In programs, we could give a constant value for something. For example we could give the value 99. Then the program will always use 99. Or we could give a symbolic name and then assign a different value many times. The value might be the same during a single execution or the value could change many times during execution.
We use delegates to allow us to refer to methods symbolically. The actual instance of the method can change. We can have a class that has a delegate and each instance of the class can specify a different actual method. We can create the class and specify what method to use for the delegate and we can create another instance of the class and specify a totally different method. So each of the two instances might do two different things depending on what was specified for the delegate.
This question is asked at least once a month. There are many previous answers in other threads and there are articles in this web site.
Sam HobbsRank #107 · 20.5K reputationPosted Apr 22, 2012, 12:07 PM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 22, 2012, 1:07 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 22, 2012, 2:51 PM EDT
Sure a MulticastDelegate provides a list of delegates but it is only one way of using delegates. It has nothing to do with the definition of what a delegate is except as an example of how delegates can be used.
Nitesh KejriwalRank #253 · 9.9K reputationPosted Apr 22, 2012, 10:32 PM EDT
jnmsy19 reputationPosted Apr 23, 2012, 2:38 AM EDT
The following videos may help you http://www.bestdotnettraining.com/Online/Training/SQL-Server/Stored-Procedures/155
VulpesRank #55 · 29.2K reputationPosted Apr 23, 2012, 3:25 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 23, 2012, 9:53 AM EDT
jnmsy19 reputationPosted Apr 23, 2012, 9:17 PM EDT
The following videos may help you..
http://www.bestdotnettraining.com/Online/Training/CSharp/Delegates-Events/70