LINQ Filtering
This script can be used to filter collections through the use of LINQ.
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(-15);
list.Add(21);
list.Add(5);
list.Add(9);
list.Add(123);
var integerList = list.Where(x => x > 5);
var integerList = list.OrderByDescending(x => x).ToList();Last updated