Пример #1
0
        public static void RunFactory()
        {
            var factory = new HyundaiFactory();

            var hyundai = factory.GetCar(HyundaiCars.VernaCar);

            Console.WriteLine(hyundai.ToString());

            hyundai = factory.GetCar(HyundaiCars.I20Car);
            Console.WriteLine(hyundai.ToString());
        }
Пример #2
0
    public static void RunFactory()
    {
      var factory = new HyundaiFactory();

      var hyundai = factory.GetCar( HyundaiCars.VernaCar );
      Console.WriteLine( hyundai.ToString() );

      hyundai = factory.GetCar( HyundaiCars.I20Car );
      Console.WriteLine( hyundai.ToString() );
    }