public T this[int index] { get { var iter = first; while (index-- != 0) { first = first.GetNext(); } return(iter.GetValue()); } set { var iter = first; while (index-- != 0) { first = first.GetNext(); } iter.SetValue(value); } }
public bool MoveNext() { if (iterator == null) { iterator = start; return(iterator != null); } iterator = iterator.GetNext(); return(iterator != null); }
public void PushBack(T toPush) { if (last == null) { first = new DoubleLinkedNode <T>(toPush); last = first; ++count; return; } last.LinkToNext(new DoubleLinkedNode <T>(toPush)); last = last.GetNext(); ++count; }