Skip to content

Instantly share code, notes, and snippets.

@mythz mythz/main.cs
Created Apr 7, 2019

Embed
What would you like to do?
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);
csvQueueInit.Print();
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.