How would I convert this c# code to vb.net? -
hello found code online , seems want. it written in c# i'm not familiar with. polyglot programmers out there can convert vb.net? appreciate may give!
foreach (datagridviewcolumn clm in grdview.columns) { bool founddata = false; foreach (datagridviewrow row in grdview.rows) { if (row.cells[clm.index].value.tostring() != string.empty) { founddata = true; break; } } if (!founddata) { grdview.columns[clm.index].visible = false; } }
try this:
for each clm datagridviewcolumn in grdview.columns dim founddata boolean = false each row datagridviewrow in grdview.rows if row.cells(clm.index).value.tostring() <> string.empty founddata = true exit end if next if not founddata grdview.columns(clm.index).visible = false end if next
Comments
Post a Comment