Passing arguments to a console application from C#

后端 未结 3 913
春和景丽
春和景丽 2021-01-20 11:32

i need to run console applications from another c# application,how to load & pass arguments to console application from my c# application in order to execute the console

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-20 11:43

    With Process.Start, the second parameter is the parameter to the application:

    Process.Start("IExplore.exe", "www.northwindtraders.com");
    

    The above example is from http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx. This contains more examples on how to start a process.

提交回复
热议问题