Table of Contents

Class CsvReadException

Namespace
FlameCsv.Exceptions
Assembly
FlameCsv.Core.dll

Thrown for faulty but structurally valid CSV.

public class CsvReadException : CsvReadExceptionBase, ISerializable
Inheritance
object
Exception
CsvReadException
Implements
Inherited Members

Constructors

CsvReadException(string?, Exception?)

Thrown for faulty but structurally valid CSV.

public CsvReadException(string? message = null, Exception? innerException = null)

Parameters

message string
innerException Exception

Properties

ActualFieldCount

The actual field count.

public required int ActualFieldCount { get; init; }

Property Value

int

ExpectedFieldCount

The expected field count.

public required int ExpectedFieldCount { get; init; }

Property Value

int

Message

Gets a message that describes the current exception.

public override string Message { get; }

Property Value

string

The error message that explains the reason for the exception, or an empty string ("").

Methods

ThrowForInvalidFieldCount<T>(int, CsvRecordRef<T>)

Throws an exception for a CSV record having an invalid number of fields.

[DoesNotReturn]
public static void ThrowForInvalidFieldCount<T>(int expected, CsvRecordRef<T> record) where T : unmanaged, IBinaryInteger<T>

Parameters

expected int
record CsvRecordRef<T>

Type Parameters

T

Exceptions

CsvReadException