Beispiel #1
0
 public StackArray(StackLink <T> stack)
 {
     Count    = stack.Count;
     Capacity = (Count / 10 + 1) * 10;
     data     = new T[Capacity];
     stack.CopyTo(data, 0);
 }
Beispiel #2
0
        public StackLink(StackLink <T> stack)
        {
            Head = null;
            Tail = null;
            Node <T> data = stack.Head;

            Count = stack.Count;
            while (data != null)
            {
                Push(data.info);
                data = data.next;
            }
        }