NET中实现了相应的类
Stackusing System;
using System.Collections;
using System.Collections.Generic;public class Hello
(
  public static void Main(String[]args){
    Stack ds=new Stack();
    for(int i=1;i<=10;i++){
      ds.Push(i); //进
    }   while(!ds.Empty()){
      Console.WriteLine(ds.Pop()); //出。
   }
  }
)