Enum in CsvHelper
CsvMode
Added in v22.0.0
public enum CsvMode- Namespace
CsvHelper- Assembly
CsvHelper.dll- Builds
- net10.0 netstandard2.1 netstandard2.0 net47
- Source
- CsvMode.cs
Values
| Name | Value | Description |
|---|---|---|
Rfc4180 | 0 | RFC 4180 (the default). A quote at the start of a field opens a quoted field in which separators and line breaks are ordinary text and a doubled quote ("") is an escaped quote. When reading, a quote that appears anywhere else in an unquoted field is kept as an ordinary character. |
Escape | 1 | No quoting: the escape character (CsvReaderOptions.Escape, \ by default) makes the character after it ordinary text. a\,b is the value a,b, \\ is \, and an escape before a line break keeps the line break in the field (before CR LF, the pair). Any other escaped character is itself: \n is the letter n. Quotes are ordinary text. |
NoEscape | 2 | No quoting or escaping: every character except the separator and line breaks is text, read and written as is (TSV exports, logs). |
FixedWidth | 3 | Fixed-width columns without separators. Each line is a record, split into columns by CsvReaderOptions.FieldWidths, counted in characters (UTF-16 code units, as string.Length counts them). |