2 Answers
2

Delegation is assigning a responsibility to some other object. For example, if I am invited to a meeting and I assign it to a junior colleague, I am delegating. The point to note here is that it is the junior colleague who will attend the meeting and there is no intermediary between him and me.

Dispatching is not delegating. Dispatcher is more like an intermediary who relays a request to someone else. For example, to attend the meeting my astute junior colleague may ask a cab company for a pick up and the guy receiving the request may dispatch it to a nearby cab driver. The point here is that dispatcher is only passing along the request.

The dispatcher can be considered as a Queue where the events are sent.

A dispatcher runs on the UI thread and executes events for the UI.

In windows, UI controls may only be modified by the thread that created them, so any changes to the UI must be done from the UI thread - thus that is one of the critical reasons why operations that modify window elements must be sent to the UI's dispatcher.

A background thread that calls BeginInvoke on the dispatcher will return immediately even though the dispatcher may not have gotten around to processing. If Invoke had been used instead, the background thread would block until the UI thread completed processing. Note that in Silverlight, there is no Invoke on the Dispatcher and in most cases you probably don't want your background thread blocking while the UI thread is processing work.

Delegate

Delegate is used for Callback and Event Handling.

The Dictionary meaning of Delagate is "A person acting for another person". but in .net its a really means a method acting for another method.

Delegate uses worker threads in the thread pool.

When you're on the UI thread (or any thread really) you can call BeginInvoke and Invoke on a delegate. BeginInvoke will use a worker thread to call the delegate using the same way I have told above. Invoke, however, would not use a different thread. It would simply invoke the delegate synchronously in the context of the calling thread and return when completed.