Table of Contents

Method Read

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

Read(TextReader, char, int)

Reads a list.

public static CsvMergeData Read(TextReader reader, char delimiter = ',', int maxRecords = 0)

Parameters

reader TextReader

The text.

delimiter char

The field delimiter (a comma; a tab for a tab-separated list).

maxRecords int

The most records read (0: no limit beyond the reader's end).

Returns

CsvMergeData

The list.

Exceptions

ArgumentNullException

reader is null.

ArgumentException

The delimiter is a quote or a line end.

FormatException

The list is empty, a quoted value is never closed, a value is longer than MaxValueLength, or a row has more than MaxFields fields.