BeginInvoke not invoking the target method in Release build
Posted
by Elan
on Stack Overflow
See other posts from Stack Overflow
or by Elan
Published on 2010-06-08T20:29:23Z
Indexed on
2010/06/08
20:32 UTC
Read the original article
Hit count: 274
I have a method, which I wish to execute on the UI message pump and thus do the following:
private void SomeMethod() {
BeginInvoke(new MethodInvoker(MethodToInvoke));
}
private void MethodToInvoke() {
// This method contains code that I wish to execute on UI message pump.
}
Now, the above works just fine when I create a Debug build of the project. However, when I create a Release build, the "MethodToInvoke" method does not get invoked.
Does anyone have any idea why this might be?
Thanks, Elan
© Stack Overflow or respective owner