static void Main(string[] args) { VehicleFactory vf = new ConcreteVehicleFactory(); ifactory myvehicle = vf.generateVehicles("Bike"); myvehicle.manufacture(10); myvehicle = vf.generateVehicles("car"); myvehicle.manufacture(10); }
static void Main(string[] args) { VehicleFactory obj = new ConcreteVehicleFactory(); Ifactory myVehicle = obj.GenerateVehicles("Bike"); myVehicle.manufacture(10); myVehicle = obj.GenerateVehicles("Car"); myVehicle.manufacture(20); Console.ReadKey(); }