Exemplo n.º 1
0
        public static void SortIt()
        {
            ArrayList products = ProductCSharp1.GetSampleProducts();

            products.Sort(new ProductNameCompareCSharp1());
            foreach (ProductCSharp1 product in products)
            {
                Console.WriteLine(product);
            }
        }
Exemplo n.º 2
0
        public static void QueryIt()
        {
            ArrayList products = ProductCSharp1.GetSampleProducts();

            foreach (ProductCSharp1 product in products)
            {
                if (product.Price > 10m)
                {
                    Console.WriteLine(product);
                }
            }
        }