Hej hej,
I had something very weird when I had to close our application. It came in our method with this code.
(the invoke code was hit, but did not close our application).
When I changed the code to:
It worked, Does anybody know what's the difference between those pieces of code? It looks almost the same.
Greetz,
Jonatahn
I had something very weird when I had to close our application. It came in our method with this code.
(the invoke code was hit, but did not close our application).
Code:
if (InvokeRequired)
this.Invoke((MethodInvoker)delegate { Application.Exit(); });
else
Application.Exit();
Code:
MethodInvoker toExecute = delegate
{
Application.Exit();
};
if (InvokeRequired)
this.Invoke(toExecute);
else
Application.Exit();
Greetz,
Jonatahn
Comment