public IEnumerator <T> GetEnumerator() { ListNodeT <T> current = Last; while (current != null) { yield return(current.Value); current = current.Prev; } }
public ListNodeT <T> AddLast(T node) { var newNode = new ListNodeT <T>(node); if (First == null) { First = newNode; Last = First; } else { Last.Next = newNode; newNode.Prev = Last; Last = newNode; } return(newNode); }