I\'m trying to parse a CSV file into a 2D array in C#. I\'m having a very strange issue, here is my code:
string filePath = @\"C:\\Users\\Matt\\Desktop\\Eve Spre
This is the same as posted by Pavel, but it ignores empty lines that may cause your program to crash.
var filePath = @"C:\Users\Matt\Desktop\Eve Spread Sheet\Auto-Manufacture.csv"; string[][] data = File.ReadLines(filepath).Where(line => line != "").Select(x => x.Split('|')).ToArray();