CachedCsvReader Constructor (TextReader, Boolean, Char, Char, Char, Char, ValueTrimmingOptions, Int32)

Initializes a new instance of the CsvReader class.

Namespace:  LumenWorks.Framework.IO.Csv
Assembly:  LumenWorks.Framework.IO (in LumenWorks.Framework.IO.dll)

Syntax


public CachedCsvReader(
	TextReader reader,
	bool hasHeaders,
	char delimiter,
	char quote,
	char escape,
	char comment,
	ValueTrimmingOptions trimmingOptions,
	int bufferSize
)
Public Sub New ( _
	reader As TextReader, _
	hasHeaders As Boolean, _
	delimiter As Char, _
	quote As Char, _
	escape As Char, _
	comment As Char, _
	trimmingOptions As ValueTrimmingOptions, _
	bufferSize As Integer _
)
public:
CachedCsvReader(
	TextReader^ reader, 
	bool^ hasHeaders, 
	wchar_t^ delimiter, 
	wchar_t^ quote, 
	wchar_t^ escape, 
	wchar_t^ comment, 
	ValueTrimmingOptions^ trimmingOptions, 
	int^ bufferSize
)

Parameters

reader
Type: TextReader
A TextReader pointing to the CSV file.
hasHeaders
Type: Boolean
trueTruetruetrue (True in Visual Basic) if field names are located on the first non commented line, otherwise, falseFalsefalsefalse (False in Visual Basic).
delimiter
Type: Char
The delimiter character separating each field (default is ',').
quote
Type: Char
The quotation character wrapping every field (default is ''').
escape
Type: Char
The escape character letting insert quotation characters inside a quoted field (default is '\'). If no escape character, set to '\0' to gain some performance.
comment
Type: Char
The comment character indicating that a line is commented out (default is '#').
trimmingOptions
Type: LumenWorks.Framework.IO.Csv..::..ValueTrimmingOptions
bufferSize
Type: Int32
The buffer size in bytes.

Exceptions


ExceptionCondition
ArgumentNullExceptionreader is a nullNothingnullptra null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionbufferSize must be 1 or more.