Beispiel #1
0
        static void Main(string[] args)
        {
            List <object> objs = new List <object>()
            {
                "杜甫", "白居易", "苏轼", "李白", "韩信", "嬴政", "刘禹锡", "柳宗元"
            };
            AddressList address = new AddressList(objs);

            for (var it = address.CreateIterator(); !it.IsLast(); it.Next())
            {
                Console.WriteLine(it.CurrentObj());
            }
            Console.ReadKey();
        }
Beispiel #2
0
 public AddressIterator(AddressList list)
 {
     addresslist = list;
     this.list   = list.GetObj();
     cursor      = 0;
 }