Esempio n. 1
0
        /// <summary>
        /// Code inside to be written in client mathod
        /// </summary>
        public static void CallFactory()
        {
            VehicleFactory factory = new ConcreteVehicleFactory();

            IVehicleFactory scooter = factory.GetVehicle("Scooter");

            scooter.Drive(10);

            IVehicleFactory bike = factory.GetVehicle("Bike");

            bike.Drive(20);

            Console.ReadKey();
        }