G
grmAbay
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(string aParameter, int anotherParameter) {
....
}
When I want to use this method with a thread I do it like this:
Thread doSomethingThread= new Thread(new ThreadStart(this.DoSomething));
doSomethingThread.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(string aParameter, int anotherParameter) {
....
}
When I want to use this method with a thread I do it like this:
Thread doSomethingThread= new Thread(new ThreadStart(this.DoSomething));
doSomethingThread.Start();
Where do I add the parameters?