Esempio n. 1
0
        public static ListTest <T> operator +(ListTest <T> list1, ListTest <T> list2)
        {
            ListTest <T> newList = new ListTest <T>();

            for (int i = 0; i < list1.count; i++)
            {
                newList.Add(list1[i]);
            }
            for (int i = 0; i < list2.count; i++)
            {
                newList.Add(list2[i]);
            }
            return(newList);
        }
Esempio n. 2
0
        public ListTest <T> Zip(ListTest <T> list2)
        {
            ListTest <T> newlist = new ListTest <T>();

            if (count >= list2.count)
            {
                count = list2.count;
            }
            for (int i = 0; i < count; i++)
            {
                newlist.Add(mainArray[i]);
                newlist.Add(list2[i]);
            }
            return(newlist);
        }