I am working on a File Parser using StreamReader on MemoryStream which in turn is created from a csv file. We have our own file parser to validate the file. I know there are now many solutions available but this is something I cannot avoid at this moment.
It works very smoothly except couple of scenarios 1) User can prefer using Alt+Enter to enter something on one of the comments columns. StreamReader.ReadLine() takes that as a new row. 2) Deleting data instead of deleting rows makes that an empty row and reader validates them as well.
One of the solution I found for Issue 2 was to use TextFieldParser of Microsoft.VisualBasic-
var parser = new TextFieldParser(new StringReader(line))
var readFields = parser.ReadFields();
but this again doesn't solves Issue 1. I am looking for something that will solve both the problems.
Any help is appreciated.