1

When I'm updating the GUI from another thread and using the Control.Invoke delegate I'll usually write something like this Control.Invoke(new Action(() => Control.Text = "Foo"));. Now obviously this works just fine, but I'm a newbie and I always try to find out if there's a cleaner and/or more correct way to write things. Now the thing that's bothering me slightly about this is that I have to type out the instance method again within the Action delegate, isn't there a way to reference the invoker of the delegate directly akin to the this keyword?

Thanks in advance,

Overly Excessive
  • 2,045
  • 15
  • 29

0 Answers0