// Aggregate is used to work over an entire collection and return the output of the work. Each item in the collection is used to create another item which is of same type as of individual items
// eg. Creating a comma separated list of values
List<string> input = new List<string>() { "a", "b", "c", "d"};
string output = "'" + input.Aggregate((curr, prev) => curr + "','" + prev ) + "'";
Aggregate is used to work over an entire collection and return the output of the work. Each item in the collection is used to create another item which is of same type as of individual items
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.