public void ParkVehicle(Vehicle vehicle) { garage.Add(vehicle); //int newindex= garage.Add(vehicle,indexnum); //indexnum = newindex; }
private void AddCar() { string regst = Extensions.AskForString("Registernummer", ui); bool has1 = garage.Any(ve => ve.RegisterNummer.EqualsInsensitive(regst)); if (has1) { ui.Print("vehicule exists already with that registernumber"); return; } string brandc = Extensions.AskForString("Brand", ui); string colorc = Extensions.AskForString("Color", ui); int wheelsc = Extensions.AskForInt("Wheels", ui); string fueltype = Extensions.AskForString("FuelType", ui); var car = new Car(regst, brandc, colorc, wheelsc, fueltype); garage.Add(car); ui.Print("You add a new Car"); }
public void ParkVehicle(Vehicle vehicle) { garage.Add(vehicle); }
public bool ParkIn(Vehicle vehicle) { return(garage.Add(vehicle)); }