C Sharp Syntax - Anonymous Methods

Anonymous Methods

Anonymous methods, or in their present form more commonly referred to as "lambda expressions", is a feature which allows you to write inline closure-like functions in your code.

There are various ways to create anonymous methods. Prior to C# 3.0 there was limited support by using delegates.

See also

  • Anonymous function
  • Closure (computer science)

Read more about this topic:  C Sharp Syntax

Famous quotes containing the words anonymous and/or methods:

    Men, my dear, are very queer animals, a mixture of horse- nervousness, ass-stubbornness, and camel-malice—with an angel bobbing about unexpectedly like the apple in the posset, and when they can do exactly as they please, they are very hard to drive.
    Oh, England. Sick in head and sick in heart,
    Sick in whole and every part,
    And yet sicker thou art still
    For thinking that thou art not ill.
    —Thomas Henry Anonymous (1825–95)

    The comparison between Coleridge and Johnson is obvious in so far as each held sway chiefly by the power of his tongue. The difference between their methods is so marked that it is tempting, but also unnecessary, to judge one to be inferior to the other. Johnson was robust, combative, and concrete; Coleridge was the opposite. The contrast was perhaps in his mind when he said of Johnson: “his bow-wow manner must have had a good deal to do with the effect produced.”
    Virginia Woolf (1882–1941)