public static void Demo() { List <ProductTwo> products = ProductTwo.GetSampleProducts(); var filtered = from ProductTwo p in products where p.Price > 10 select p; foreach (ProductTwo p in filtered) { Console.WriteLine(p); } }
public static void DemoTwo() { List <ProductTwo> products = ProductTwo.GetSampleProducts(); products.FindAll(delegate(ProductTwo p) { return(p.Price == null); }).ForEach(Console.WriteLine);//Ask Ke }