我正在创建一个控制台应用程序,我希望有两个输出和一个输入。原因是,一个输出始终可见。将控制台分成两部分用于两个输出
This is the first output
Text flows upwards just like a regular console application, however...
---------
This is a second output
This is placed at the bottom of the console // also input goes here.
我想称它是这样的
Console.Out.Writeline("This is the first output");
Console.Out.Writeline("Text flows upwards just like a regular console application, however...");
MyTextWriter.WriteLine("This is a second output");
MyTextWriter.WriteLine("This is placed at the bottom of the console");
但我怎么会去两个部分分裂控制台的?它甚至有可能吗?
这真的很整洁!这真的是我正在寻找的格式:)虽然,问题是,我已经有很多使用Console.Out编写的代码,所以我需要以某种方式重定向输出并手动输出它。需要一些修补:) +1虽然 – Default 2010-08-08 15:20:30
这很好!需要注意的是 - 如果你正在写大量的控制台,Console.Clear()会导致闪烁。 – Onisemus 2012-04-13 21:06:53