比如 for (int n = 0; n < dataGridView1.Rows.Count; n++)
{
if (dataGridView1.Rows[n].Cells[1].Value.ToString() != null)
{
if (dataGridView1.Rows[第n+1行].Cells[1].Value.ToString() == null)
{
//代码
}
}
}
上面的第2个if()语句里面的[第n+1行]该怎么写?[n+1]?还是没有这样的表达?
for (int n = 0; n < dataGridView1.Rows.Count-1; n++) { if (dataGridView1.Rows[n].Cells[1].Value.ToString() != null) { if (dataGridView1.Rows[n+1].Cells[1].Value.ToString() == null) { //代码 } } }