2
Answers

puting value from txt file to process.StandardOutput.Read()

diamond diamond

diamond diamond

10y
1.1k
1
Hi,
 
I have a cce.exe program which I want to call it from C#. This program returns its output in TXT file.
Now I want to read this file and put it in process.StandardOutput.ReadToEnd()
Please help 
Thanks in advance,
 
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "C:\\cce.exe";
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;


Process process = Process.Start(psi);

if (process.WaitForExit((int)TimeSpan.FromSeconds(10).TotalMilliseconds))
{
string bytes_result = process.StandardOutput.ReadToEnd(); ??? I should read txt file in put it in
bytes = Convert.ToDouble(bytes_result);

Answers (2)