private static void displayLicensePlates(Garage i_Garage) { Console.WriteLine( @"====== Display license Plates of the Vehicles in The Garage ===== Press 1 - To Display only the vehicles in repair Press 2 - To Display only the repaired vehicles Press 3 - To Display only the paid up vehicles"); string userSelection = getSelectionByRange(1, 3); List <string> licensePlates = new List <string>(); switch (char.Parse(userSelection)) { case '1': Console.WriteLine("==== The Vechile in Repair ==== "); licensePlates = i_Garage.LicenseNumbersByConditions(VehicleInRepair.eVehicleCondition.inRepair); break; case '2': Console.WriteLine("==== The Repaired Vechiles ==== "); licensePlates = i_Garage.LicenseNumbersByConditions(VehicleInRepair.eVehicleCondition.wasFixed); break; case '3': Console.WriteLine("==== The Paid Up Vechiles ==== "); licensePlates = i_Garage.LicenseNumbersByConditions(VehicleInRepair.eVehicleCondition.paidUp); break; } if (licensePlates.Count == 0) { Console.WriteLine("No License Plates To Display"); } foreach (string vechileLicensePlate in licensePlates) { Console.WriteLine("License Number: {0}", vechileLicensePlate); } }