O'Reilly logo

Microsoft® Visual C#® 2012 Step by Step by John Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20. Decoupling Application Logic and Handling Events

After completing this chapter, you will be able to

  • Declare a delegate type to create an abstraction of a method signature.

  • Create an instance of a delegate to refer to a specific method.

  • Call a method through a delegate.

  • Define a lambda expression to specify the code to be executed by a delegate.

  • Declare an event field.

  • Handle an event by using a delegate.

  • Raise an event.

Many of the examples and exercises in this book have placed great emphasis on the careful definition of classes and structures to enforce encapsulation. In this way, the implementation of the methods in these types can change without unduly affecting the applications that use them. However, sometimes it is not always possible ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required