Skip to content

Aggregation

Hendrik Bulens edited this page Jul 21, 2021 · 2 revisions
 List<Customer> customers = new List<Customer>()
{
  new Customer(1, "Jake Marquez", "New York"),
  new Customer(2, "Michael Jennings", "Pittsburgh"),
  new Customer(3, "Frank Hansom", "Phoenix"),
  new Customer(4, "Margareth Boyer", "New York")
};

string allCustomers = customers.Aggregate(x => x.Id); // returns "1,2,3,4"
Clone this wiki locally