Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# csvhelper

void Main()
{
    var records = new List<dynamic>();
    
    dynamic record = new ExpandoObject();
    record.Id = 1;
    record.Name = "one";
    records.Add(record);
    
    using (var writer = new StringWriter())
    using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
    {
        csv.WriteRecords(records);
        
        writer.ToString().Dump();
    }
}
Source by joshclose.github.io #
 
PREVIOUS NEXT
Tagged: #csvhelper
ADD COMMENT
Topic
Name
6+7 =