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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top