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:

    It is to be lamented that the principle of national has had very little nourishment in our country, and, instead, has given place to sectional or state partialities. What more promising method for remedying this defect than by uniting American women of every state and every section in a common effort for our whole country.
    Catherine E. Beecher (1800–1878)

    This immediate dependence of language upon nature, this conversion of an outward phenomenon into a type of somewhat in human life, never loses its power to affect us. It is this which gives that piquancy to the conversation of a strong-natured farmer or backwoodsman, which all men relish.
    Ralph Waldo Emerson (1803–1882)

    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)