There’s been quite some hype around the new Reactive Framework in .NET 4.0. While I think I undestood its basic concept I am not completely sold that it is that useful. Can you come up with a good example (that is halfway easy to understand) that totally shows of the power and usefullness of Rx? Show something that makes life so much easier when done with Rx.
There’s been quite some hype around the new Reactive Framework in .NET 4.0. While
Share
Here is a quick example. Program a drag operation in a fully declarative manner, using LINQ to events.
And draw a line from startpos to current pos
As you can see, there are no event handlers all over the places, nor boolean variables for managing the state.
If you are curious about those GetEventName() methods, suggesting you to read this entire article and download the source code and play with it.
Read it here and play with the source >>