Collections & LINQ · Lesson 15

Your own project

Open in Code keeps a copy the course cannot overwrite.

How it works

The button copies this sample into a project on the device. A later visit to the lesson does not replace that project. Continue opens the same project. New copy leaves it unchanged and makes another one.

A working example

var prices = new[] { 12m, 8m, 25m };
Console.WriteLine(prices.Where(p => p >= 10m).Sum());

Expected output

37
Try this
Try the filter on a smaller list.