Al Programming
Free source code programming in C#, VB.Net, Java, SQL
Search This Blog
Thursday, March 3, 2016
Concatenate list of strings c#
C#
> Enumerable >
Aggregate
Aggregate p
erforms a calculation over a sequence of values.
Example
List
<
string
> items =
new
List
<
string
>() {
"1"
,
"2"
,
"3"
,
"4"
};
var
x = items.Aggregate((a, b) => a +
","
+ b);
// "1,2,3,4"
Newer Post
Older Post
Home