<=?Utf-8?B?SmFtZXMgTGVubm9u?= <James
Le****@discussions.microsoft.com>> wrote:
I want to execute an events delegates in the windows forms thread.
What is the easiest way to do this?
I created another delegate and called BeginInvoke on the active form
and inside this delgate handler I invoked the events delgates. Is
there an easier way?
I think that's basically the easiest way - it's not terribly arduous,
to be honest. In my view you should be declaring the delegate and
specifying the add/remove code for the event normally anyway, otherwise
there's a hidden lock on "this". See
http://www.pobox.com/~skeet/csharp/m...ml#lock.choice
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too