コード例 #1
0
        public static ListFunctions <T> operator +(ListFunctions <T> one, ListFunctions <T> two)
        {
            ListFunctions <T> currentList = new ListFunctions <T>();

            for (var i = 0; i < one.ArrayLength; i++)
            {
                currentList.AddList(one[i]);
            }

            for (var j = 0; j < two.ArrayLength; j++)
            {
                currentList.AddList(two[j]);
            }


            return(currentList);
        }
コード例 #2
0
        public ListFunctions <T> ZipList(ListFunctions <T> two)
        {
            ListFunctions <T> newList = new ListFunctions <T>();
            int i = 0;

            if (count > two.count)
            {
                while (i < two.count)
                {
                    newList.AddList(MyArray[i]);
                    newList.AddList(two[i]);

                    i++;
                }
                newList.AddList(MyArray[i]);
                i++;
            }
            else if (count < two.count)
            {
                while (i < count)
                {
                    newList.AddList(MyArray[i]);
                    newList.AddList(two[i]);

                    i++;
                }
                newList.AddList(MyArray[i]);
                i++;
            }
            else
            {
                while (i < count)
                {
                    newList.AddList(MyArray[i]);
                    newList.AddList(two[i]);

                    i++;
                }
            }

            return(newList);
        }
コード例 #3
0
 public void StartProgram()
 {
     ListFunctions <int> listFunctions = new ListFunctions <int>();
 }