65.9K
CodeProject is changing. Read more.
Home

String concatenation using LINQ to create a CSV/PSV string

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Jun 28, 2011

CPOL
viewsIcon

6570

The idea was good, but I think we could probably do something like below:public static string UsingStringJoin(IEnumerable sList, string separator){ return sList.Any() ? string.Join(separator, sList.ToArray()) : string.Empty;}public static string...