コード例 #1
0
ファイル: PilhaObj.cs プロジェクト: htreza/Projetos-C-
 public void multiPush(PilhaObj aux)
 {
     while (!aux.IsEmpty())
     {
         this.Push(aux.Pop());
     }
 }
コード例 #2
0
ファイル: PilhaObj.cs プロジェクト: htreza/Projetos-C-
        public object multiPop(int n)
        {
            if (IsEmpty() || n > topo)
            {
                return(null);
            }
            PilhaObj aux = new PilhaObj(n);

            for (int i = 0; i < n; i++)
            {
                aux.Push(this.Pop());
            }
            return(aux);
        }