My application uses a DataSet to store data. Whenever I must loop through a DataTable, I use code that looks something like this:
For Each ElementRow As DataRow In ElementTable.Select("TRUE", "", DataViewRowState.CurrentRows)
...
That works, but I suspect it isn't the best technique. It bothers me that I must specify FilterExpression and Sort, even though I don't want to filter and I don't care about the sort order. Have I overlooked a more appropriate way to iterate through rows?
-TC
For Each ElementRow As DataRow In ElementTable.Select("TRUE", "", DataViewRowState.CurrentRows)
...
That works, but I suspect it isn't the best technique. It bothers me that I must specify FilterExpression and Sort, even though I don't want to filter and I don't care about the sort order. Have I overlooked a more appropriate way to iterate through rows?
-TC