|
suppose datagrideview.rows.count=4
in the previews code when i counter is 4 exception raised
exception message"
"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
but when I make the upper bounder of the conditiion is datagrideview.rows.count-1 it works but the last item in the dataviewgrid doesn't send to thread
what is the problem?
thanx alot
Bilal SalasPosted Jun 18, 2010, 5:01 PM
it is also make send thred for n-1 requests and I want to sent thread ro n requests
PJ MartinsPosted Jun 17, 2010, 11:13 AM
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (!dataGridView1.Rows[i].IsNewRow)
new Thread((ThreadStart)delegate { GetProxies(dataGridView1.Rows[i].Cells[0].Value.ToString()); }).Start();
}