Code |
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

PJ MartinsRank #2,548 · 548 reputationPosted Jun 17, 2010, 7:13 AM EDT
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();
}
Bilal Salas16 reputationPosted Jun 18, 2010, 1:01 PM EDT
it is also make send thred for n-1 requests and I want to sent thread ro n requests