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…

  1. Start by adding a new Windows Forms project to ...

Get C# Programming Cookbook now with O’Reilly online learning.

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