Phil Hack
  • Home
Subscribe
Tagged

csv

A collection of 1 post

c#

Turn all object in a list into a csv with quotes

Sample C# code: var foos = GetAllFoos().FooName.AsEnumerable(); if (foos == null) return “”; foos = foos.OrderBy(x => x.Value); var result = “‘” + string.Join(“‘,’”, foos.Select(x => x.Value)) + “‘”;

Phil Hack Apr 6, 2014 • 1 min read
Phil Hack © 2022
Powered by Ghost