예제 #1
0
 public static void GetMinAndMaxAndPrint(CarDealer cd)
 {
     Console.WriteLine("--------------------------");
     Console.WriteLine("Choose a min price range ");
     try
     {
         int userMin = int.Parse(Console.ReadLine());
         Console.WriteLine("Choose a max price range ");
         int userMax = int.Parse(Console.ReadLine());
         Console.WriteLine("These cars are within your price range: \n");
         cd.PriceRange(userMin, userMax);
         Console.WriteLine("--------------------------");
     }
     catch (FormatException ex)
     {
         Console.WriteLine(ex.Message);
     }
 }