예제 #1
0
        public IEnumerable <T> GetValues()
        {
            LinkedNode <T> p = this;

            while (p != null)
            {
                yield return(p.Value);

                p = p.Next;
            }
        }
예제 #2
0
        public void AddNext(T value)
        {
            LinkedNode <T> p = this;

            while (p.Next != null)
            {
                p = p.Next;
            }

            p.Next = new LinkedNode <T>(value);
        }