In-Memory Data

One of the most prominent sources of data is the computer’s own memory, though it’s often overlooked as a true data source. In-memory collections are containers for series of objects to which you might want to apply certain operations. For the sake of discussion, let’s consider an in-memory list of products stored as .NET objects in a generic list collection:

image

Now assume we want to perform various query operations on this data to filter it, order it, group it, and so on. This turns out to be a very manual, imperative-style task, using loops, conditions, intermediate collections, and so on. Let’s just show the code you could write ...

Get C# 4.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.