コード例 #1
0
        public void Copy(LinkListGen <T> tempList)
        {
            LinkGen <T> temp = list;

            while (temp != null)
            {
                tempList.AddItem(temp.Data);
                temp = temp.Next;
            }
            list = tempList.list;
        }
コード例 #2
0
        public void RemoveItem(T item)
        {
            LinkGen <T>     temp     = list;
            LinkListGen <T> tempList = new LinkListGen <T>();

            while (temp != null)
            {
                if (item.CompareTo(temp.Data) != 0)
                {
                    tempList.AddItem(temp.Data);
                }
                temp = temp.Next;
            }
            list = tempList.list;
        }