public IEnumerable <T> GetValues() { LinkedNode <T> p = this; while (p != null) { yield return(p.Value); p = p.Next; } }
public void AddNext(T value) { LinkedNode <T> p = this; while (p.Next != null) { p = p.Next; } p.Next = new LinkedNode <T>(value); }