Using LINQ to perform queries
Rx allow developers to use the IObservable
interface that represents synchronous data streams to write queries using LINQ. To recap, Rx can be thought of as consisting of three sections:
- Observables: The interface that brings together and represents all these data streams
- Language-Integrated Query (LINQ): The ability to use LINQ to query these multiple data streams
- Schedulers: Parametrizing concurrency using schedulers
In this recipe, we will be looking at the LINQ functionality of Rx in more detail.
Getting ready
As observables are just data streams, we can use LINQ to query them. In the following recipe, we will output text to the screen based on a LINQ query.
How to do it…
- Start by adding a new Windows Forms project to ...
Get C# Programming Cookbook 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.