CommonEngineReadCsv Method (String, Char, Int32, Encoding) |
A fast way to read record by record a CSV file with a custom
delimiter. The fields can be quoted.
Namespace:
FileHelpers
Assembly:
FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntaxpublic static IEnumerable<RecordIndexer> ReadCsv(
string filename,
char delimiter,
int headerLines,
Encoding encoding
)
Public Shared Function ReadCsv (
filename As String,
delimiter As Char,
headerLines As Integer,
encoding As Encoding
) As IEnumerable(Of RecordIndexer)
Parameters
- filename
- Type: SystemString
The CSV file to read - delimiter
- Type: SystemChar
The field delimiter. - headerLines
- Type: SystemInt32
The number of header lines in the CSV file - encoding
- Type: System.TextEncoding
The file Encoding
Return Value
Type:
IEnumerableRecordIndexerAn enumeration of
RecordIndexer
See Also