How to start a Process in a Thread

前端 未结 5 481
陌清茗
陌清茗 2021-01-02 08:45

FURTHER EDIT the following is not production code - I\'m just playing around with a couple of classes trying to figure out how I run processes wit

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 09:12

    Just start the process normally using this code:

    Process.Start("notepad.exe");
    

    There is no point and no benefits in creating a thread to run a new process. It's like running a batch file that executes "cmd.exe" when you can directly execute "cmd.exe"... you are just doing more than what's necessary for nothing. Don't reinvent the wheel and play easy :P

提交回复
热议问题