public void Append(string s) { ChainListNode <string> node = new ChainListNode <string>(s); this.chainList.Add(node); this.length += s.Length; }
public void Append(ChainList <T> chainList) { if (this.head == null) { this.head = chainList.head; this.tail = chainList.tail; return; } this.tail.Next = chainList.head; this.tail = chainList.tail; }
public void Add(ChainListNode <T> node) { if (this.head == null) { this.head = node; this.tail = node; return; } this.tail.Next = node; this.tail = node; }
public bool MoveNext() { if (this.current == null) { if (this.head == null) { return(false); } this.current = this.head; return(true); } if (this.current.Next == null) { return(false); } this.current = this.current.Next; return(true); }