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); } }
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); }