Skip to content

Instantly share code, notes, and snippets.

Created April 7, 2019 20:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mythz/17142ed8796b025466460dfd67635b9d to your computer and use it in GitHub Desktop.
CSV Serialize Test
using System;
using System.Linq;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
class ListEntry
public ListEntry(string a, string b)
SomeField = a;
SomeField2 = b;
public string SomeField { get; set; }
public string SomeField2 { get; set; }
class CurrentList : List<ListEntry>
var testList = new CurrentList();
testList.Add(new ListEntry("pam","tam"));
testList.Add(new ListEntry("qqq","aaa"));
string csvQueueInit = CsvSerializer.SerializeToCsv(testList);
<?xml version="1.0" encoding="utf-8"?>
<package id="System.Memory" version="4.5.2" targetFramework="net45" />
<package id="ServiceStack.Text" version="5.5.0" targetFramework="net45" />
<package id="ServiceStack.Client" version="5.5.0" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="5.5.0" targetFramework="net45" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment