Mega Code Archive

 
Categories / C# Tutorial / LINQ
 

Aggregate three values

using System; using System.Collections.Generic; using System.Linq; using System.Text;     class Program     {         static void Main(string[] args)         {             string[] curries = { "abc", "abcd", "ab" };             Console.WriteLine(curries.Aggregate<string, string, string>(                 "curries:",                 (a, b) => a + " " + b,                 a => a));         }     }