CsvConverterOpenReadTResult(TextReader, CsvToTResult, Char, Boolean, CsvOpts) Method
Initializes a
CsvReaderTResult instance to parse CSV data
as a collection of
TResult instances.
Namespace: FolkerKinzel.CsvTools.MappingsAssembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
public static CsvReader<TResult> OpenRead<TResult>(
TextReader reader,
CsvTo<TResult> converter,
char delimiter = ',',
bool isHeaderPresent = true,
CsvOpts options = CsvOpts.Default
)
Public Shared Function OpenRead(Of TResult) (
reader As TextReader,
converter As CsvTo(Of TResult),
Optional delimiter As Char = ","C,
Optional isHeaderPresent As Boolean = true,
Optional options As CsvOpts = CsvOpts.Default
) As CsvReader(Of TResult)
public:
generic<typename TResult>
static CsvReader<TResult>^ OpenRead(
TextReader^ reader,
CsvTo<TResult>^ converter,
wchar_t delimiter = L',',
bool isHeaderPresent = true,
CsvOpts options = CsvOpts::Default
)
static member OpenRead :
reader : TextReader *
converter : CsvTo<'TResult> *
?delimiter : char *
?isHeaderPresent : bool *
?options : CsvOpts
(* Defaults:
let _delimiter = defaultArg delimiter ','
let _isHeaderPresent = defaultArg isHeaderPresent true
let _options = defaultArg options CsvOpts.Default
*)
-> CsvReader<'TResult>
- reader TextReader
- The TextReader with which the CSV data is
read.
- converter CsvToTResult
-
An object that converts a CSV row to a TResult
instance.
- delimiter Char (Optional)
- The field separator character.
- isHeaderPresent Boolean (Optional)
- true, to interpret the first line as a header,
otherwise false.
- options CsvOpts (Optional)
- Options for reading CSV.
- TResult
- Generic type parameter that specifies the Type
of the items that the CsvReaderTResult returns.
CsvReaderTResultA
CsvReaderTResult that allows you to iterate through the
data parsed from the CSV.
When importing CSV data from Excel, the appropriate arguments can be determined
with
GetExcelArguments.