ParameterizedThreadStart function must be static?
-
Tuesday, May 19, 2009 6:48 PMHello all,
Is it necessary to declare the function that is passed as the "ParameterizedThreadStart" argument as static?
All Replies
-
Tuesday, May 19, 2009 7:07 PMModerator
No. See the sample in ParameterizedThreadStart on MSDN: http://msdn.microsoft.com/en-us/library/system.threading.parameterizedthreadstart.aspx
The "DoMoreWork" sample delegate is an instance method, not a static method.
Reed Copsey, Jr. - http://reedcopsey.com- Marked As Answer by OmegaManMVP, Moderator Tuesday, May 19, 2009 9:15 PM
-
Tuesday, May 19, 2009 7:11 PMModerator
No not at all, but you would have to instantiate the target object and pass in its reference. Just make sure the reference stays alive, otherwise the thread will have the rug pulled out from under it.
William Wegerson (www.OmegaCoder.Com)- Marked As Answer by OmegaManMVP, Moderator Tuesday, May 19, 2009 9:15 PM

