O'Reilly logo

Programming Reactive Extensions and LINQ by Paul Betts, Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Distinguishing Rx and LINQ

LINQ is brilliant at working with static collections, allowing you to use a SQL-like syntax to query and manipulate data from disparate sources. On the other hand, Rx's forté is in working with what we call future collections—that is collections that have been defined, but not yet fully populated.

LINQ requires that all the data be available when we first start writing our LINQ statements. That is, to build a new collection with LINQ, we need a starting collection.

What happens, however, if we don't have all the data? Imagine trying to write a service that operates on live, stock-trading data, in which case we want to operate on incoming streams of data in real-time. LINQ would not know what to do with this, as a stream ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required