How do I find out if a process is already running using c#?

前端 未结 9 818
轻奢々
轻奢々 2020-12-07 23:15

I have C# winforms application that needs to start an external exe from time to time, but I do not wish to start another process if one is already running, but rather switch

9条回答
  •  鱼传尺愫
    2020-12-07 23:43

    I think the complete answer to your problem requires understanding of what happens when your application determines that an instance of foo.exe is already running i.e what does '//TODO: Switch to foo.exe process' actually mean?

提交回复
热议问题