Example #1
0
        public IEnumerator <T> GetEnumerator()
        {
            SList <T> cur = this;

            while (cur != Nil)
            {
                yield return(cur.m_v);

                cur = cur.m_nxt;
            }
        }
Example #2
0
        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            SList <T> cur = this;

            while (cur != Nil)
            {
                yield return(cur.m_v);

                cur = cur.m_nxt;
            }
        }
Example #3
0
 public SList(T val, SList <T> next)
 {
     m_v = val; m_nxt = next;
 }