M
Milsnips
Hi there,
i've created a little test app where i send an email to myself and select a number from a combobox how many times to send it.
My sending function is called
void doMailSend()
{
//send the email here...
}
and it works fine with threading, however i want to pass an incrementing value to it to reference a datagrid row, so what i would like to do is the following:
void doMailSend(int rowPosition)
{
//send the email here...
}
for (int i = 0; i < emailcount.Value; i++)
{
Thread t = new Thread(new ThreadStart(doMailSend(i)));
t.Start();
}
and....
but the compiler throws me back an error at this line and i dont know what to do to solve it..:
No overload for 'doMailSend' matches delegate 'System.Threading.ThreadStart'
any help appreciated,
thanks,
Paul
i've created a little test app where i send an email to myself and select a number from a combobox how many times to send it.
My sending function is called
void doMailSend()
{
//send the email here...
}
and it works fine with threading, however i want to pass an incrementing value to it to reference a datagrid row, so what i would like to do is the following:
void doMailSend(int rowPosition)
{
//send the email here...
}
for (int i = 0; i < emailcount.Value; i++)
{
Thread t = new Thread(new ThreadStart(doMailSend(i)));
t.Start();
}
and....
but the compiler throws me back an error at this line and i dont know what to do to solve it..:
No overload for 'doMailSend' matches delegate 'System.Threading.ThreadStart'
any help appreciated,
thanks,
Paul