private static void Main(string[] args) { string carName = "BMW"; var car = AutoFactory.CreateCar(carName); car.Start(); car.Stop(); Console.ReadKey(); }
static void Main(string[] args) { //string carName = args[0]; string carName = Console.ReadLine(); var carFactory = new AutoFactory(); var car = carFactory.CreateInstance(carName); car.TurnOn(); car.TurnOff(); Console.ReadLine(); }