public void RemoveAt(int i) { int j = 0; DoubleLinkedNode <T> p = head; DoubleLinkedNode <T> q = head.Next; while (q != null) { if (i == j) { p.Next = q.Next; (p.Next).Prior = p; return; } p = q; q = q.Next; j++; } throw new IndexOutOfRangeException("Index Out Of Range Exception in " + this.GetType()); }
public DoubleLinkedNode() { prior = next = null; }
public DoubleLinkedList() { head = new DoubleLinkedNode <T>(); // 指向作为标志的头节点 }
public DoubleLinkedNode(T k) { item = k; prior = next = null; }