private static void RunSimpleFactory(string carName) { AutoFactory factory = new AutoFactory(); IAuto car = factory.CreateInstance(carName); car.TurnOn(); car.TurnOff(); }
public static void Main2(string[] args) { string carName = args[0]; AutoFactory factory = new AutoFactory(); IAuto car = factory.CreateInstance(carName); car.TurnOn(); car.TurnOff(); }