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

Example: Parsing a Tab Separated File

A real-world challenge, made more tractable by LINQ, is parsing a delimited file and extracting useful information as if it came from a normalized database. In this next example, we parse the contents of a tab-separated, value text file. The following are the first few lines of the file and its tab-separated fields:

name    id        beer_style        first_brewed        alcohol_content        original_gravity             final_gravity        ibu_scale        country        brewery_brand        color_srm        from_region            containers Miller Genuine Draft        /m/02hv39w Hakim Stout        /m/059q7h1        Stout                5.8                                         Harar Beer Factory                Ethiopia         ...

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