A Reactive Application

Before we dive into the C# language feature called events, let’s see how far the observation from the previous two figures brings us by using bare-bone delegates to create a reactive application. To keep things simple, we continue our way in the good old world of console applications to implement a countdown mechanism that’s operated as follows:

Image The user sets the number of seconds to count down.

Image The user instructs the countdown mechanism to start.

The countdown raises an event after every elapsed second.

The countdown ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.