Esempio n. 1
0
        public static SwedishCarPlate[] GenerateCarPlates(int length)
        {
            var plates = new SwedishCarPlate[length];

            for (int i = 0; i < length; i++)
            {
                plates[i] = new SwedishCarPlate();
            }
            Console.WriteLine($"{length} Swedish car plates generated in a list.");
            return(plates);
        }
Esempio n. 2
0
 public static bool IsLettersOfALessThanB(SwedishCarPlate a, SwedishCarPlate b)
 {
     return(CompareLetters(a, b) < 0);
 }
Esempio n. 3
0
 public static int CompareNumbers(SwedishCarPlate plateA, SwedishCarPlate plateB)
 {
     return(String.Compare(plateA.Numbers, plateB.Numbers));
 }