Interface IParser
- Namespace
- CsvHelper
- Assembly
- CsvHelper.dll
Defines methods used the parse a CSV file.
public interface IParser : IDisposable
- Inherited Members
Properties
ByteCount
Gets the count of how many bytes have been read. CountBytes needs to be enabled for this value to be populated.
long ByteCount { get; }
Property Value
CharCount
Gets the count of how many characters have been read.
long CharCount { get; }
Property Value
Configuration
Gets the configuration.
IParserConfiguration Configuration { get; }
Property Value
Context
Gets the reading context.
CsvContext Context { get; }
Property Value
Count
Gets the number of fields for the current row.
int Count { get; }
Property Value
Delimiter
The delimiter the parser is using.
string Delimiter { get; }
Property Value
this[int]
Gets the field at the specified index for the current row.
string this[int index] { get; }
Parameters
index
intThe index.
Property Value
- string
The field.
RawRecord
Gets the raw record for the current row.
string RawRecord { get; }
Property Value
RawRow
Gets the raw row the parser is currently on.
int RawRow { get; }
Property Value
Record
Gets the record for the current row. Note: It is much more efficient to only get the fields you need. If you need all fields, then use this.
string[]? Record { get; }
Property Value
- string[]
Row
Gets the CSV row the parser is currently on.
int Row { get; }
Property Value
Methods
Read()
Reads a record from the CSV file.
bool Read()
Returns
- bool
True if there are more records to read, otherwise false.
ReadAsync()
Reads a record from the CSV file asynchronously.
Task<bool> ReadAsync()