public static void Main() { var cart = new ShoppingCart { Products = new List<Product> { new Product {Name="Pencil",Category="Stationery", Price=9.0M }, new Product {Name="Tie",Category="Clothes", Price=100.00M }, new Product {Name="Pen",Category="Stationery", Price=12.0M } } }; var filteredList = cart.Filter1(product => product.Category == "Stationery" && product.Price > 10.00M); foreach (var product in filteredList) { Console.Write(product.Name + ", "); } Console.WriteLine(); Func<Product, bool> clothesFilter = product => product.Category == "Clothes"; foreach (var product in cart.Filter1(clothesFilter)) { Console.Write(product.Name + ", "); } Console.WriteLine(); }