O'Reilly logo

C# 4.0 Unleashed by Bart De Smet

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

Events Revisited

Before getting back to our example, let’s reestablish the way we look at events. Recall how the typical event pattern is based on EventHandler<T> as the signature of an event and its handlers:

image

Every time such an event is raised, we get some data that travels from the event source to the listener, represented as an instance of the TEventArgs argument. In other words, it’s fair to say that events are data sources. For example, in our CountDown example the event source is really a data source producing decreasing values representing the number of seconds that are left until the countdown finishes.

When someone says data they immediately ...

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