1 | initial version |
There are a few ways you can run the same executable as the present instance in C#, without using Process.Start(). Here are two ways:
AppDomain.CurrentDomain.ExecuteAssembly(Assembly.GetEntryAssembly().Location);
This will execute the same executable as the present instance.
MethodInfo method = typeof(Program).GetMethod("Main");
method.Invoke(null, null);
Replace "Program" with the name of your program class if it's different. This will call the Main() method of the same executable, effectively running it again.