CsvHelper wrap all valus with quotes
问题 I am using CsvHelper I need to wrap all values with quotes. Is that possible? Data = is a List using (StreamWriter textWriter = new StreamWriter(path)) { textWriter.BaseStream.Write(p, 0, p.Length); // var dt = new DataTable(); var csv = new CsvWriter(textWriter); csv.WriteRecords(Data); textWriter.Flush(); textWriter.Close(); } Thanks 回答1: There is a config value called ShouldQuote where you can determine on a field level if it should be quoted. void Main() { var records = new List<Foo> {