private static List <Car> ProcessCsvFileWithCarsClassicLinq(string path) { var query = from car in File.ReadAllLines(path).Skip(1) where car.Length > 1 select Car.ParseFromCsvLine(car); return(query.ToList()); }
public static IEnumerable <Car> ProcessCsv(string path) { return(File.ReadAllLines(path) .Skip(1) .Where(l => l.Length > 1) .Select(l => Car.ParseFromCsvLine(l)) .ToList()); }