Beispiel #1
0
 public MyIterator(STO s)
 {
     sto         = s;
     carl        = new List <Car> [3];
     carl[0]     = sto.Cars;
     carl[1]     = sto.Repair;
     carl[2]     = sto.Finish;
     current_lst = 0;
     current_arr = -1;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            STO sto = new STO();

            sto.AddCar(new Car("Lexus", 2010));
            sto.AddCar(new Car("Toyota", 2012));
            sto.AddCar(new Car("Honda", 2015));
            sto.AddCar(new Car("Volvo", 2009));
            sto.RepairCar();
            sto.RepairCar();
            sto.FinishRepair();
            foreach (dynamic item in sto)
            {
                Console.WriteLine(item);
            }
        }