Link to home
Create AccountLog in
Avatar of AWestEng
AWestEngFlag for Sweden

asked on

Thread Safe: Event

I use events in my methods and what I like to know is, must I do something to make the events thread-safe or are the already that by default?
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
at the constructor add this line of code:
Control.CheckForIllegalCrossThreadCalls = true;

CheckForIllegalCrossThreadCalls is enabled by default is visual studio 2005
Avatar of AWestEng

ASKER

Not exactly what I was looking for, but maybe my fault. thx anyway