Exemplo n.º 1
0
        public static lst <T> operator +(lst <T> L, lst <T> R)
        {
            var list = new lst <T>(L);

            list.AddRange(R);
            return(list);
        }
Exemplo n.º 2
0
        public static lst <T> operator -(lst <T> L, int R)
        {
            var list = new lst <T>(L);

            list.RemoveAt(R);
            return(list);
        }
Exemplo n.º 3
0
        public static lst <T> operator +(lst <T> L, T R)
        {
            var list = new lst <T>(L)
            {
                R
            };

            return(list);
        }
Exemplo n.º 4
0
        public lst <T> subList(int startIndex, int endIndex) //=> GetRange(startIndex, count) as lst<T>;
        {
            var temp      = new lst <T>();
            int currIndex = startIndex;

            while (currIndex <= endIndex)
            {
                temp += this[currIndex];
                currIndex++;
            }
            return(temp);
        }