I am trying to accomplish something like this:
Obviouslly this doesn't work and returns and error message as follows:Code:{ string sType ="Update"; Thread th1 = new Thread (new ThreadStart(Operation1(sType))); th1.Start(); } private void Operaton1(string sType) { if (sType == "Update") { } else { } }
Method name expected
It works fine if my "Operation1" has no parameters but I somehow need to pass the information from "sType" into the Thread itself...
How could I accomplish passing a STRING into a THREAD I am about to start?
Any help would be greatly appreciated.
Thanks,




Reply With Quote