CSharp Stuff

From PeformIQ Upgrade
Revision as of 22:47, 1 May 2013 by PeterHarding (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Stuff

Use ProcessStartInfo and Process classes and set RedirectStandardOutput to true, then you can capture the output from a stream.

ProcessStartInfo info = new ProcessStartInfo("process.exe", "-arg1 -arg2");
info.RedirectStandardOutput = true;
Process p = Process.Start(info);
p.Start();
string output = p.StandardOutput.ReadToEnd();