CSScriptCompilers.CPPCompiler.RunApp C# (CSharp) Метод

RunApp() статический приватный Метод

static private RunApp ( string app, string args ) : string
app string
args string
Результат string
		static string RunApp(string app, string args)
		{
			Process myProcess = new Process();
			myProcess.StartInfo.FileName = app;
			myProcess.StartInfo.Arguments = args;
			myProcess.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
			myProcess.StartInfo.UseShellExecute = false;
			myProcess.StartInfo.RedirectStandardOutput = true;
			myProcess.StartInfo.CreateNoWindow = true;
			myProcess.Start();

			StringBuilder builder = new StringBuilder();

			string line = null;
			while (null != (line = myProcess.StandardOutput.ReadLine()))
			{
				builder.Append(line + "\n");
			}
			myProcess.WaitForExit();

			return builder.ToString();
		}