Console output

Sample Code

class Program {
    static void Main() {
        var process = new Process {
            StartInfo = new ProcessStartInfo {
                CreateNoWindow = true,
                RedirectStandardOutput = true,
                RedirectStandardInput = true,
                UseShellExecute = false,
                FileName = @"C:\temp\Hello.exe",
                Arguments = "world"
            },
            EnableRaisingEvents = true
        };
        process.OutputDataReceived += (sender, e) => {
            Debug.WriteLine(e.Data);
        };
        process.Start();
        process.BeginOutputReadLine();
        process.WaitForExit();
        process.CancelOutputRead();        
    }
}

Notes

When you need to execute a process and handle the text output, this code will take care of that for you, dealing with the output one line at a time.