static void Main(string[] args) { ProductCatalog catalog = new ProductCatalog(); var product = catalog.Lookup("AA"); Console.WriteLine("Id: {0}", product.Id); Console.WriteLine("Name: {0}", product.Name); Console.WriteLine("Price: {0}",product.Price); Console.ReadLine(); }
static void Main(string[] args) { ProductCatalog searsCatalog = new ProductCatalog(); int userIdNum; Console.Write("Enter the Product ID# for the item you would like to purchase: "); userIdNum = Convert.ToInt32(Console.ReadLine()); Product userProduct = searsCatalog.Lookup(userIdNum); Console.WriteLine(string.Format("\nYou have chose to purchase a {0} for {1:c}.", userProduct.Name, userProduct.Price)); Console.ReadLine(); //pause }
static void Main(string[] args) { var catalog = new ProductCatalog(); Debug.Assert(catalog.LookupId(1234) == 1234); }
static void Main(string[] args) { ProductCatalog catalog = new ProductCatalog(); Product prod1 = catalog.Lookup("UB3459456UD"); }
static void Main(string[] args) { ProductCatalog catalog = new ProductCatalog(); Product product1 = catalog.Lookup("UY8890NB"); }