示例#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;
 }
示例#2
0
文件: Program.cs 项目: Dima-21/STO
        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);
            }
        }