Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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
        }
Esempio n. 3
0
        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
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            var catalog = new ProductCatalog();

            Debug.Assert(catalog.LookupId(1234) == 1234);
        }
Esempio n. 5
0
 static void Main(string[] args)
 {
     var catalog = new ProductCatalog();
     Debug.Assert(catalog.LookupId(1234) == 1234);
 }
Esempio n. 6
0
 static void Main(string[] args)
 {
     ProductCatalog catalog = new ProductCatalog();
     Product prod1 = catalog.Lookup("UB3459456UD");
 }
Esempio n. 7
0
 static void Main(string[] args)
 {
     ProductCatalog catalog = new ProductCatalog();
     Product        prod1   = catalog.Lookup("UB3459456UD");
 }
Esempio n. 8
0
 static void Main(string[] args)
 {
     ProductCatalog catalog  = new ProductCatalog();
     Product        product1 = catalog.Lookup("UY8890NB");
 }
Esempio n. 9
0
 static void Main(string[] args)
 {
     ProductCatalog catalog = new ProductCatalog();
     Product product1 = catalog.Lookup("UY8890NB");
 }