Advertisement

Pro C# 7 pp 365-406 | Cite as

Delegates, Events, and Lambda Expressions

  • Andrew Troelsen
  • Philip Japikse
Chapter

Abstract

Up to this point in the text, most of the applications you have developed added various bits of code to Main(), which, in some way or another, sent requests to a given object. However, many applications require that an object be able to communicate back to the entity that created it using a callback mechanism. While callback mechanisms can be used in any application, they are especially critical for graphical user interfaces in that controls (such as a button) need to invoke external methods under the correct circumstances (when the button is clicked, when the mouse enters the button surface, and so forth).

Copyright information

© Andrew Troelsen and Philip Japikse 2017

Authors and Affiliations

  • Andrew Troelsen
    • 1
  • Philip Japikse
    • 2
  1. 1.MinneapolisUSA
  2. 2.West ChesterUSA

Personalised recommendations