When I tried to build the following code, I got the error in the title.
this.Invoke(delegate()
{
Application.DoEvents();
});
I can overcome it by converting the anonymous method to a delegate:
this.Invoke(new Action(delegate() {
Application.DoEvents();
}));
More to read:
They are Anonymous Methods, not Anonymous Delegates.
http://staceyw.spaces.live.com/blog/cns!F4A38E96E598161E!1042.entry

