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:
The user sets the number of seconds to count down.
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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.