Illustrated C#2012 by Daniel Solis

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

C H A P T E R  14

Events

Publishers and Subscribers

One common requirement in many programs is that when a particular program event occurs, other parts of the program need to be notified that the event has occurred.

One pattern for satisfying this requirement is called the publisher/subscriber pattern. In this pattern, a class, called the publisher, defines a set of events that other parts of the program might be interested in. Other classes can then “sign up” to be notified by the publisher when these events occur. These subscriber classes “sign up” for notification by supplying ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required