Beispiel #1
0
 public virtual void Push(string value)
 {
     var item = new StackItem(value);
     item.Next = Head;
     Head = item;
     Count++;
 }
Beispiel #2
0
 public string Pop()
 {
     if (Head == null)
         return null;
     var result = Head.Value;
     Head = Head.Next;
     Count--;
     return result;
 }