T
TC
I'm working on an application which must manipulate data in a DataSet.
Very often, I must loop through the rows in a DataTable. To do that,
I've been writing code that looks like this:
For Each ElementRow As DataRow In ElementTable.Select("TRUE", "",
DataViewRowState.CurrentRows)
....
That works, but I suspect it isn't the best way. After all, it seems
inappropriate that I should have to provide values for
FilterExpression and Sort when I don't want a filter and don't care
about the sort order. Have I overlooked a better way to loop through
the rows in a DataTable?
-TC
Very often, I must loop through the rows in a DataTable. To do that,
I've been writing code that looks like this:
For Each ElementRow As DataRow In ElementTable.Select("TRUE", "",
DataViewRowState.CurrentRows)
....
That works, but I suspect it isn't the best way. After all, it seems
inappropriate that I should have to provide values for
FilterExpression and Sort when I don't want a filter and don't care
about the sort order. Have I overlooked a better way to loop through
the rows in a DataTable?
-TC