$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #577

Which programming language is this?

var byCity = people
    .GroupBy(p => p.City)
    .Select(g => new { City = g.Key, Count = g.Count() })
    .OrderByDescending(x => x.Count);

Answer: C#

LINQ method chaining with GroupBy, g.Key and an anonymous type new { ... } is C#.
Play Programming Languages ▸