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
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?