I'm working on some optimisation code and have recently moved away from using the system() function to open xfoil.exe and direct input and output files,
cmd = sprintf('cd %s && xfoil.exe < xfoil.inp > xfoil.out &',working_directory);[status,result] = system(cmd);
and I am now attempting to complete the same operations using:
process = System.Diagnostics.Process();process.StartInfo.FileName = 'xfoil.exe';process.StartInfo.Arguments = %not sure what to put here%;
process.StartInfo.UseShellExecute = false;process.StartInfo.RedirectStandardInput = true;process.StartInfo.RedirectStandardOutput = true;process.StartInfo.CreateNoWindow = false;process.Start();
I'm not very experienced with coding in general, so I'm struggling a bit here, but I really need some help to figure out how to redirect standard input and standard output to my two files (xfoil.inp and xfoil.out) using .Net System.Diagnostics.Process.
Best Answer