I believe what I need is reflection, but after looking into it I'm not sure how I'm supposed to make it work.
I'm trying to run a second instance of the application that should tell the main instance to execute a procedure, and this code must run from the first instance. I've been able to identify if an instance is already running by using a mutex.
if (Mutex.WaitOne(TimeSpan.Zero, true) == false)
{
//program already has an instance running
//How do I call a method on the first (already running) instance
}
What I'd like it to do is execute a procedure from the first (already running) instance.