C# Read and filter lines from file

Something useful in C# from .NET 4.0:

File.ReadLines("c:\test.txt").Where(x => !x.StartsWith("xYz--"));
File.ReadLines("c:\test.txt").AsParallel().Where(x => !x.StartsWith("xYz--"));

[ msdn ]

Advertisements