CsvBadDataContext Class
Describes malformed data found by CsvReader or Utf8CsvReader, passed to CsvReaderOptions.BadDataHandler.
public sealed class CsvBadDataContextRemarks
The context is only valid during the call to the handler: the handler must not call the methods of the reader.
Properties
| Name | Description |
|---|---|
| ColumnIndex | Gets the 0-based index of the column that contains the malformed data, or null when the error is about the whole record. |
| ColumnName | Gets the name of the column from the header row, or null when the column has no name or the header row is not read yet. |
| Exception | Gets the exception that the reader throws for this error in strict mode, or when the handler returns CsvBadDataAction.Throw. |
| Kind | Gets the kind of malformed data. |
| LineNumber | Gets the 1-based line number where the record starts. |
| Message | Gets the description of the error, without its location. |
| Position | Gets the 0-based position, in characters or in bytes from the start of the data, where the record starts. |
| RowIndex | Gets the 0-based index of the record, not counting the header row, or null when the record is the header row. |
ColumnIndex
CsvBadDataContext.csColumnName
CsvBadDataContext.csException
CsvBadDataContext.csGets the exception that the reader throws for this error in strict mode, or when the handler returns CsvBadDataAction.Throw.
public CsvException Exception { get; }