我正在創建一個控制檯應用程序,我希望有兩個輸出和一個輸入。原因是,一個輸出始終可見。將控制檯分成兩部分用於兩個輸出
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