Hey, having trouble getting my head around delegates, can anyone have a bash at explaining them or pointing me to a decent tutorial.
I understand they can call many methods at runtime but I cannot think of a situation where you would need this other than in an Event.
Loading

Danatas GerviRank #4,152 · 361 reputationPosted Oct 11, 2009, 3:30 AM EDT
:-)
Roei BarRank #1,271 · 1.4K reputationPosted Oct 11, 2009, 4:32 AM EDT
say you want to update a form via another form
cross form connection is not an available option, in order to do that you will need to use a delegate event for Updating information. something like a Cross Thread Safe Event Handling
Trinity105 reputationPosted Oct 11, 2009, 12:54 PM EDT
Imagine that you want to create your custom event, then you have to use delegate
Imagine that you want to only execute a code without having the obligation to create a class you use delegate to execute anonymous method
Imagine that you want to execute code in a separate thread then you use delegate there are many cases to use delegates
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 11, 2009, 12:59 PM EDT
1. Creating Custom Event ..
2. Cross threading Operations ( When you access Content of Another Thread From Running thread )
:)
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Oct 11, 2009, 10:02 PM EDT
http://www.c-sharpcorner.com/UploadFile/niradhip/delegates109122009063813AM/delegates1.aspx
Rajeswari nathan97 reputationPosted Oct 11, 2009, 10:56 PM EDT
This is the functional pointer...
(ie) you can create on method and point it using delegate..
Why Delegate?
1. We can not pass the method as parameter in to another method.
We can do it in delegate..
2. We can create our own events by using delegate...