QQ交流群:110826636

控制台当前行显示进度条,不换行

        static void Main(string[] args)
        {
            for (int i = 0; i <= 100; i++) {
                Console.Write("\r当前进度{0}%",i);
                Thread.Sleep(1000);
            }
        }

利用\r将光标移到首部,然后输出覆盖

posted @ 2016-04-07 21:46  FourOne  阅读(721)  评论(1编辑  收藏  举报