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:

    Women are denied masturbation even more severely than men and that’s another method of control—they’re not taught to please themselves.... Most women—it takes them a while to warm up to the “situation” but once they get into it, I’m sure they’re going to get just as hooked as—well, everyone I know is!
    Lydia Lunch (b. 1959)

    To play safe, I prefer to accept only one type of power: the power of art over trash, the triumph of magic over the brute.
    Vladimir Nabokov (1899–1977)

    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)