Exemplo n.º 1
0
        private static void PrintReverseList(DLinkedList <int> dll)
        {
            Console.WriteLine("");

            var itr = dll.GetIterator();

            itr.End();

            while (itr.IsValid())
            {
                Console.WriteLine("{0}", itr.GetData());
                itr.MovePrev();
            }
        }
Exemplo n.º 2
0
        private static void PrintForwardList(DLinkedList <int> dll)
        {
            Console.WriteLine("");

            var it = dll.GetIterator();

            it.Start();

            while (it.IsValid())
            {
                Console.WriteLine("{0}", it.GetData());
                it.MoveNext();
            }
        }