foreach (var row in table.Rows)
{
DoSomethingWith(row);
}
Assuming that I'm working with a standard System.Data.DataTable
(which has a collection of System.Data.DataRow
objects), the variable 'row' above resolves as an object
type, not a System.Data.DataRow
.
foreach (DataRow row in table.Rows)
{
DoSomethingWith(row);
}
Works as I would expect. Is there a particular reason for this?
Thanks.