pp.RedirectStandardOutput = true; pp.UseShellExecute = false; pp.CreateNoWindow = true; pp.RedirectStandardError = true; Process p = new Process(); p.StartInfo = pp; p.Start(); StreamReader sr = new StreamReader(p.StandardOutput.BaseStream, p.StandardOutput.CurrentEncoding); string line = ""; string output = ""; while ((line = sr.ReadLine()) != null) { output += line; } p.WaitForExit(); p.WaitForExit(); textBox1.Text = output;
void main() { int a; printf("/nEnter a Number"); scanf("%d",&a); printf("Number is %d",a); }
p.StandardInput.WriteLine("7");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)