コード例 #1
0
        public IEnumerator GetEnumerator()
        {
            DoubleNode <T> tmp = this.Head;

            while (tmp != null)
            {
                yield return(tmp.Val);

                tmp = tmp.Next;
            }
        }
コード例 #2
0
        public void Add(T node)
        {
            DoubleNode <T> tmp = this.Head;

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

            tmp.Next = new DoubleNode <T> {
                Next = null, Previous = tmp, Val = node
            };
        }