for (int c = 0; c < table.Rows[r].Count; c++) ...