示例#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;
 }