Ejemplo n.º 1
0
        public void DeleteMoreThanA()
        {
            DoubleNode <T> current = head;

            while (current != null)
            {
                if ((int)'№' < (int)current.ToChar(current.Data.ToString()))
                {
                    Console.WriteLine(current.Data);
                    Console.WriteLine((int)'№');
                    Remove(current.Data);
                }
                current = current.Next;
            }
        }
Ejemplo n.º 2
0
        public void Add(T data)
        {
            DoubleNode <T> node = new DoubleNode <T>(data);

            if (head == null)
            {
                head = node;
            }
            else
            {
                tail.Next     = node;
                node.Previous = tail;
            }
            tail = node;
            count++;
        }