Thread

  • Thread starter Thread starter Mohan
  • Start date Start date
M

Mohan

Hi,

What is the procedure to pass parameters to the Thread Function. ?

I have a thread, which accepts string as input parameter..


Thanks & Regards,
Mohan
 
What is the procedure to pass parameters to the Thread Function. ?
I have a thread, which accepts string as input parameter..

In .NET v1.x you typically save the "parameters" as state in the
object where the thread start method is located. The method itself
doesn't take any parameters.

In .NET v2.0 there's a new ParameterizedThreadStart delegate you can
pass to Thread.Start that takes a parameter.



Mattias
 
Back
Top