Difference between revisions of "CSharp Stuff"

From PeformIQ Upgrade
Jump to navigation Jump to search
(Created page with "=Stuff= use ProcessStartInfo and Process classes and set RedirectStandardOutput to true, then you can capture the output from a stream. <pre> ProcessStartInfo info = new Pro...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Stuff=
=Stuff=


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


<pre>
<pre>

Latest revision as of 23:47, 1 May 2013

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();