Beispiel #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);
        }
Beispiel #2
0
 public static bool IsLettersOfALessThanB(SwedishCarPlate a, SwedishCarPlate b)
 {
     return(CompareLetters(a, b) < 0);
 }
Beispiel #3
0
 public static int CompareNumbers(SwedishCarPlate plateA, SwedishCarPlate plateB)
 {
     return(String.Compare(plateA.Numbers, plateB.Numbers));
 }