Exemplo n.º 1
0
 // Explained in Stack class
 public override void Add(double?value)
 {
     if (item == null)
     {
         item = value;
     }
     else if (next == null)
     {
         // Create next and set item by calling Add
         next = new MyListStack();
         next.Add(value);
     }
     else
     {
         next.Add(value);
     }
 }