LINQ Basics
LINQ queries collections with Where, Select, OrderBy, First, Any and Count.
Example
var n = new[] { 5, 2, 8, 1, 9 };
var big = n.Where(x => x > 4).OrderBy(x => x);
Console.WriteLine(string.Join(",", big));
Console.WriteLine(n.Select(x => x * 2).Sum());
Console.WriteLine(n.Any(x => x > 8));Exercise
Filter.
n.(x => x > 2)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.