How do I execute a command-line program from C# and get back the STD OUT results? Specifically, I want to execute DIFF on two files that are programmatically selected and wr
If you don't mind introducing a dependency, CliWrap can simplify this for you:
var cli = new Cli("target.exe"); var output = await cli.ExecuteAsync("arguments", "stdin"); var stdout = output.StandardOutput;