public void Add(T value) { DbNode <T> newNode = new DbNode <T>(value); if (this.head == null) { // 如果链表当前为空则置为头结点 this.head = newNode; } else { } }
public DbNode <T> GetDbNodeByIndex(int index) { if (index < 0 || index > count) { throw new ArgumentOutOfRangeException("index", "索引超出范围"); } DbNode <T> tempDbNode = this.head; for (int i = 0; i < index; i++) { tempDbNode = tempDbNode.NextNode; } return(tempDbNode); }
public BaconDoubleLinkedList() { this.count = 0; this.head = null; }