Is there a way to take a List and convert it into a comma separated string?
I know I can just loop and build it, but somehow I think some of you guys a more cool w
Seems reasonablly fast.
IList listItem = Enumerable.Range(0, 100000).ToList(); var result = listItem.Aggregate(new StringBuilder(), (strBuild, intVal) => { strBuild.Append(intVal); strBuild.Append(","); return strBuild; }, (strBuild) => strBuild.ToString(0, strBuild.Length - 1));