string array to CSV

Know thy framework String to CSV String.Join

Posted Saturday, May 23, 2009 8:14 AM | Feedback (2), Filed Under .NET developement

A common task is to take an array of strings or a List<string> and parse it to a comma separated value string for use in some sort of light weight media like a cookie or an url. The way that this is usually done is to loop the array and concatenate the strings with a trailing comma “ , “ to then remove the last one. Yesterday I was on my way in doing just this procedure when I thought that there’s got to be a better way to do this. After doing some research with...