C# でコンソール アプリケーションを作成しています。そして、入力しているものを上書きするという問題があります..2つのスレッドで実行しています。
class Program
{
static void Main(string[] args)
{
//Grab Input
new Thread(new ThreadStart(getInput)).Start();
}
public static void getInput()
{
while (true)
{
string command = System.Console.ReadLine();
handleCommand(command);
}
}
public static void handleCommand(string command)
{
//Do whatever with the command
}
}
しかし、今私がするなら
System.Console.WriteLine("Anything");
私がすでに入力を書いている場合、それは私の入力の真ん中に「何でも」を置きます..コンソールアプリケーションで入力と出力をどのように分離するのか疑問に思っています:3
どんな助けでも素晴らしいでしょう。前もって感謝します..
問題の例: