示例#1
0
        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");
        }
示例#2
0
 internal void UnParkVehicle(string regno)
 {
     garage.Remove(regno);
 }
示例#3
0
        public bool ParkOut(string regNum)

        {
            return(garage.Remove(regNum));
        }