Delegation (programming) - Method Type Delegation

Method Type Delegation

In C#, a delegate is a way of telling which method to call when an event is triggered. For example, if you click a Button on a form, the program would call a specific method. It is this pointer that is a delegate. Delegates are good because you can notify several methods that an event has occurred, if you so wish.

Examples for delegates in C# follows:

Read more about this topic:  Delegation (programming)

Famous quotes containing the words method, type and/or delegation:

    The method of painting is the natural growth out of a need. I want to express my feelings rather than illustrate them. Technique is just a means of arriving at a statement.... I can control the flow of paint: there is no accident, just as there is no beginning and no end.
    Jackson Pollock (1912–1956)

    Time has an undertaking establishment on every block and drives his coffin nails faster than the steam riveters rivet or the stenographers type or the tickers tick out fours and eights and dollar signs and ciphers.
    John Dos Passos (1896–1970)

    The two great points of difference between a democracy and a republic are: first, the delegation of the government, in the latter, to a small number of citizens elected by the rest; secondly, the greater number of citizens and greater sphere of country over which the latter may be extended.
    James Madison (1751–1836)