Exemplo n.º 1
0
        private static void getVehicleInfoByLicensePlateNumber()
        {
            string licensePlateNumber = Utils.GetLicensePlateNumber();

            if (!m_Garage.HasVehicleVisited(licensePlateNumber))
            {
                string message = string.Format(
                    "The License Plate Number'{0} was not found in the system",
                    licensePlateNumber);
                throw new KeyNotFoundException(message);
                ////System.Console.WriteLine("Vehicle number does not exist!");
            }

            System.Console.WriteLine(m_Garage.GetVehicleInfoByLicensePlateNumber(licensePlateNumber));
        }