commadelimitedstringcollection makes nice csv

just posted this here as a reminder to myself or anyone else looking for a quick way to create a comma-seperated string from a list of things.

public static string ListToCsv<T>(List<T> list)
{
CommaDelimitedStringCollection commaStr = new CommaDelimitedStringCollection();
list.ForEach(delegate(T item)
  {
  commaStr.Add(item.ToString());
   });
       return commaStr.ToString();
}
  -edoode
posted @ Monday, December 15, 2008 4:54 PM
Print
Comments have been closed on this topic.
«May»
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789