【发布时间】:2009-05-02 16:28:46
【问题描述】:
我的 C# Foreach 循环中的 continue 语句有问题。
我希望它检查datagridview中是否有空白单元格,如果有,则跳过打印值并继续检查下一个单元格。
非常感谢您的帮助。
代码如下:
foreach (DataGridViewRow row in this.dataGridView1.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
if (cell.Size.IsEmpty)
{
continue;
}
MessageBox.Show(cell.Value.ToString());
}
}
【问题讨论】:
-
您忽略了提及您所看到的问题...
标签: c# datagridview foreach continue