Exemplo n.º 1
0
 public void Update(/*Object s*/)
 {
     /*Inventory inventory = (Inventory)s;*/
     Console.WriteLine("List of products in Inventory:");
     foreach (Product p in inventory.GetProducts())
     {
         Console.WriteLine(p.Name);
     }
 }
Exemplo n.º 2
0
        public void Update(/*Object s*/)
        {
            /*Inventory inventory = (Inventory)s;*/
            int count = 0;

            foreach (Product p in inventory.GetProducts())
            {
                count++;
            }
            Console.WriteLine("Number of products in Inventory: {0}", count);
        }