Пример #1
0
 public void Push(int num)
 {
     Node newNode = new Node();
     newNode.num = num;
     newNode.next = TopOfStack.next;
     TopOfStack.next = newNode;
     size++;
 }
Пример #2
0
 public MyStack()
 {
     TopOfStack = new Node();
     size = 0;
 }