Is there a way to create a second console to output to in .NET when writing a console application?

Well, you could start a new cmd.exe process and use stdio and stdout to send and recieve data.

ProcessStartInfo psi = new ProcessStartInfo("cmd.exe")
{
    RedirectStandardError = true,
    RedirectStandardInput = true,
    RedirectStandardOutput = true,
    UseShellExecute = false
};

Process p = Process.Start(psi);

StreamWriter sw = p.StandardInput;
StreamReader sr = p.StandardOutput;

sw.WriteLine("Hello world!");
sr.Close();

More info on MSDN.

Leave a Comment