Hello,
This might sound as a stupid question, but how can I pass parameters to a
thread? Let me rephrase that.
When I have a method, i declare it like this:
public void DoSomething(str ing aParameter, int anotherParamete r) {
....
}
When I want to use this method with a thread I do it like this:
Thread doSomethingThre ad= new Thread(new ThreadStart(thi s.DoSomething)) ;
doSomethingThre ad.Start();
Where do I add the parameters?
This might sound as a stupid question, but how can I pass parameters to a
thread? Let me rephrase that.
When I have a method, i declare it like this:
public void DoSomething(str ing aParameter, int anotherParamete r) {
....
}
When I want to use this method with a thread I do it like this:
Thread doSomethingThre ad= new Thread(new ThreadStart(thi s.DoSomething)) ;
doSomethingThre ad.Start();
Where do I add the parameters?
Comment