So this is the code I am using currently, but I don't specifically want to create my own reader. My problem is that I want to read a full csv file line by line, but the file contents will change from time to time, so it has to be generic.
This is what I am using currently,
try
{
var Lines = File.ReadAllLines(path);
var csvRawData = from line in Lines select (line.Split(',')).ToArray();
var csvData = csvRawData.ToList();
return csvData;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
Logger.Log(ex.Message, true);
return null;
}
The return csvData is of type List. I then just separate the content out from it manually.