Si vous voulez exécuter un fichier EXE de votre application C# et obtenir la sortie de celui-ci, vous pouvez utiliser le code ci-dessous
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "PATH TO YOUR FILE";
p.StartInfo.UseShellExecute = false;
p.StartInfo.Arguments = metalType + " " + graphHeight + " " + graphWidth;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.EnableRaisingEvents = true;
p.Start();
svgText = p.StandardOutput.ReadToEnd();
using(StreamReader s = p.StandardError)
{
string error = s.ReadToEnd();
p.WaitForExit(20000);
}
Ne pas forgete écrire p.EnableRaisingEvents = true;
Veuillez fournir plus de détails sur ce que vous essayez réellement de faire – Patel
duplication possible de [C# obtenir la sortie du processus en cours d'exécution] (http://stackoverflow.com/questions/11994610/c-sharp-get-process-output- en courant) –