public void ShallowCopy(LinkedStack sourceStack)
        {
            StackNode currNode;

              this.Clear();
              for (currNode=sourceStack.top.Next; currNode!=null; currNode=currNode.Next)
            this.Push(currNode.Data);
        }
Example #2
-1
        public void DeepCopy(LinkedStack sourceStack)
        {
            StackNode currNode;

              this.Clear();
              for (currNode=sourceStack.top.Next; currNode!=null; currNode=currNode.Next)
            this.Push(((ICloneable)currNode.Data).Clone());
        }