CsvException Class
The exception thrown when CSV data is invalid or cannot be converted.
public sealed class CsvException : Exception- Inheritance
ExceptionCsvException
Constructors
| Name | Description |
|---|---|
| CsvException() | Initializes a new instance of the CsvException class. |
| CsvException(string?) | Initializes a new instance of the CsvException class with a message. |
| CsvException(string?, Exception?) | Initializes a new instance of the CsvException class with a message and the exception that caused it. |
CsvException overloads
CsvException()
CsvException.csInitializes a new instance of the CsvException class.
public CsvException()CsvException(string?)
CsvException.csInitializes a new instance of the CsvException class with a message.
public CsvException(string? message)Parameters
messagestring?- The message that describes the error.
CsvException(string?, Exception?)
CsvException.csInitializes a new instance of the CsvException class with a message and the exception that caused it.
Parameters
messagestring?- The message that describes the error.
innerExceptionException?- The exception that caused this exception.
Properties
| Name | Description |
|---|---|
| ColumnIndex | Gets the 0-based index of the column that caused the error, if known. |
| ColumnName | Gets the name of the column that caused the error, if known. |
| LineNumber | Gets the 1-based line number where the record that caused the error starts, if known. |
| Position | Gets the 0-based position, in characters or in bytes from the start of the data, of the record that caused the error, if known. |
| RowIndex | Gets the 0-based index of the record where the error occurred, not counting the header row, if known. |