Exemplo n.º 1
0
        public static StackLinkList <T> ToStackLinkList <T>(this T[] array)
        {
            var list = new StackLinkList <T>();

            foreach (var item in array)
            {
                list += item;
            }
            return(list);
        }
Exemplo n.º 2
0
        private void WorkWithStackLinkList(int maxSize)
        {
            ShowName("StackLink");
            StackLinkList <long> stack = new StackLinkList <long>();

            for (int i = 0; i < maxSize; i++)
            {
                stack.Insert(maxSize * 10 * i);
            }

            while (!stack.IsEmpty())
            {
                Console.WriteLine(stack.Remove());
            }
            ShowEndMessage();
        }