Possible Duplicate:
thread with multiple parameters
How does one thread a sub with two arguments?
I want to thread my sub like so but its coming up with errors:
Thread t = new Thread (subname);
t.Start()
Here are the errors:
Argument 1: cannot convert from ‘method group’ to
‘System.Threading.ParameterizedThreadStart’The best overloaded method match for
‘System.Threading.Thread.Thread(System.Threading.ParameterizedThreadStart)’
has some invalid arguments
Here is how my sub looks:
public string send2(string kom, string ddm)
{
///code for a httpwebrequest (too long to post all of it)
}
Do you guys have any solutions?
You can use a lambda: