You can use the parser directly if you just want to check the first line.
var parser = new CsvParser( textReader ); var row = parser.Read(); if( row[0] == "MyColumn" ) { }
If you use Stream , you will need to reset at the beginning if you intend to use it again.
Josh close
source share