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