Calling C# program from another C# program -


this question has answer here:

i have 3 c# programs need executed in order(testcsharp1, testcsharp2 , testcsharp3).2nd program should executed after first completes , 3 should execute after 1 , 2 finish. how can this. right now, have them scheduled tasks , manually check if have finished , start others.

use proccess class (documentation) start process inside program. here example documentation:

using system; using system.diagnostics; using system.componentmodel;  namespace myprocesssample {     class myprocess     {         public static void main()         {             process myprocess = new process();              try             {                 myprocess.startinfo.useshellexecute = false;                 // can start process, helloworld do-nothing example.                 myprocess.startinfo.filename = "c:\\helloworld.exe";                 myprocess.startinfo.createnowindow = true;                 myprocess.start();                 myprocess.waitforexit(); //use if want pause execution of program till process have started closes.                 // code assumes process starting terminate itself.                   // given is started without window cannot terminate                   // on desktop, must terminate or can programmatically                  // application using kill method.             }             catch (exception e)             {                 console.writeline(e.message);             }         }     } } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -