O'Reilly logo

Essential C# 2.0 by Mark Michaelis

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

13. Delegates and Events

PREVIOUS CHAPTERS DISCUSSED extensively how to create classes using many of the built-in C# language facilities surrounding classes. The objects instantiated from classes encapsulate data and operations on data. As you create more and more classes, you see common patterns in the relationships between these classes. The previous chapter covered one such set of patterns.

Another pattern is to pass one or more methods to a receiver for invocation. This last pattern comprises the building blocks of larger patterns called publish-subscribe patterns. The use of methods as a data type and their support for publish-subscribe patterns is the focus of this chapter.

Virtually everything described within this chapter is 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