不要用System.Console.ReadLine(); 来结尾就行了,它会等你输入任何的东西才结束。

解决方案 »

  1.   

    不是的,你理解错了,你用过java吗?在程序最后加上system.exit(0);以后,程序运行到最后会提示:press any key to continue.... 按了任意键才退出,我需要C#中的这个函数!!
      

  2.   

    then use my method:
    System.Console.WriteLine("press any key to continue...");
    System.Console.ReadLine();
      

  3.   

    sorry,刚刚把问题看错了。
    Console.WriteLine("Press any key to continue ...");
    Console.ReadLine();