public CsvWriter(
TextWriter writer,
IEnumerable<string?> columnNames,
bool caseSensitive = false,
char delimiter = ','
)
Public Sub New (
writer As TextWriter,
columnNames As IEnumerable(Of String),
Optional caseSensitive As Boolean = false,
Optional delimiter As Char = ","C
)
public:
CsvWriter(
TextWriter^ writer,
IEnumerable<String^>^ columnNames,
bool caseSensitive = false,
wchar_t delimiter = L','
)
new :
writer : TextWriter *
columnNames : IEnumerable<string> *
?caseSensitive : bool *
?delimiter : char
(* Defaults:
let _caseSensitive = defaultArg caseSensitive false
let _delimiter = defaultArg delimiter ','
*)
-> CsvWriter
A collection of column names for the header to be written.
The collection determines the order in which the columns appear in the CSV and their index in CsvRecord. The CsvRecord instance, which the Record property of the newly initialized CsvWriter gets, can be accessed with this column names.
ArgumentNullException | writer or columnNames is null. |
ArgumentException | A column name in columnNames occurs twice. With caseSensitive can be chosen whether the comparison is case-sensitive or not. |
ArgumentOutOfRangeException | delimiter is either the double quotes " or a line break character ('\r' or '\n'). |