public void RemoveVehicule() { var result = garage.ToArray(); if (result.Length == 0) { ui.Print("Garage is emty"); return; } var checkReg = Extensions.AskForString("Register number", ui); var query = from Vehicule vehicule in garage where vehicule.RegisterNummer.EqualsInsensitive(checkReg) select vehicule; foreach (var item in query) { int index = Extensions.FindIndex(garage.ToArray(), item); garage.Remove(index); } ui.Print("Vehicule has been removed"); }
internal void UnParkVehicle(string regno) { garage.Remove(regno); }
public bool ParkOut(string regNum) { return(garage.Remove(regNum)); }