CsvReaderTResultTryRead Method

Tries to read the next TResult from the CSV file.

Definition

Namespace: FolkerKinzel.CsvTools.Mappings
Assembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
C#
public bool TryRead(
	out TResult result
)

Parameters

result  TResult
After the method returns true, contains the next TResult parsed from the CSV file, otherwise default.

Return Value

Boolean
true if a new TResult instance could be parsed from the CSV data, otherwise false.

Exceptions

ObjectDisposedExceptionThe CSV file was already closed.
IOExceptionI/O error.
CsvFormatExceptionInvalid CSV file. The interpretation depends on the CsvOpts value, specified in the constructor of the CsvReader.
FormatException Parsing fails and the Throwing property of that TypeConverterT is true.

See Also