コード例 #1
0
 public void ChangeStack(IStack <double> newStack)
 {
     double[] vals = terms.GetAll();
     foreach (double i in vals)
     {
         newStack.Push(i);
     }
     terms = newStack;
 }
コード例 #2
0
 /// <summary>
 /// Haalt de oude stack in arrayform op. Pushed alle items van de oude stack in de nieuwe stack en
 /// stopt de nieuwe stack in de stack variabele.
 /// </summary>
 public void ChangeStack(Interfacestack <double> newStack)
 {
     double[] oldstack = stack.GetALL();
     foreach (double i in oldstack)
     {
         newStack.Push(i);
     }
     stack = newStack;
 }
コード例 #3
0
 public Calculator(IStack <double> start)
 {
     this.terms = start;
 }
コード例 #4
0
 /// <summary>
 /// Constructor voor de Calculator class.
 /// </summary>
 public Calculator(Interfacestack <double> start)
 {
     this.stack = start;
 }