Monday 22 April 2013

Reading a CSV file with Linq


A simple single line of code  to read the CSV file in Linq:

rawFile = (from line in File.ReadAllLines(fileName).AsParallel()
            select line.Split(',')).ToList();

Happy Coding!

No comments:

Post a Comment