September 2002
Intermediate to advanced
496 pages
10h
English
Our threading example illustrated using a delegate of type ThreadStart. We pass such a delegate to the constructor of the Thread class. When we call the Start method of the thread, the callback function that is wrapped by the delegate will be called.
A powerful feature of delegates is that you can combine them. Delegates can be multicast, in which they have an invocation list of methods. When such a delegate is called, all the methods on the invocation list will be called in turn. The Delegate.Combine method can be used to combine the invocation methods of two delegate objects, and Delegate.Remove can be used to remove methods.[4]
[4] In C# you can use the overloaded + and – operators to combine and remove delegate methods. ...