As a developer you have the responsibility to stay informed and to continuously learn. Sometimes you can learn from another person’s questions and, hopefully, a good answer. Perhaps somebody has had a problem you have never faced. But perhaps you will face that problem in the future and reading about it in the past might get you to find the answer more easily (did that make sense ;-)).

So for this reason alone, I read forums all over the place including the one on LessThanDot but more recently the one on StackOverflow too.

And today I spotted this question.

Whats the difference between Invoke() and BeginInvoke()

And there came a very good answer to this question.

In short.

  • Delegate.Invoke: Executes synchronously, on the same thread.
  • Delegate.BeginInvoke: Executes asynchronously, on a threadpool thread.
  • Control.Invoke: Executes on the UI thread, but calling thread waits for completion before continuing.
  • Control.BeginInvoke: Executes on the UI thread, and calling thread doesn’t wait for completion.

Makes sense, doesn’t it?