I have my following code to read values from csv file and do some processing. I would like to skip the first row of the input csv file as it contains header text but I\'d wa
Just read it first before you get into the loop. I'd do this:
using (StreamReader sr = new StreamReader(filePath))
{
string headerLine = sr.ReadLine();
string line;
while ((line = sr.ReadLine()) != null)
{
...
}
}
(I don't like using Peek, personally.)
Then when you write out the output, start with headerLine.