Please take a look at this link.
Now i have a foreach like this :
//DataRow last = dsRequests.Tables["Requests"].Rows.Last();
foreach (DataRow drRequests in dsRequests.Tables["Requests"].Rows)
{
}
I want to determine the last iteration of the foreach loop.
So i tried this :
DataRow last = dsRequests.Tables["Requests"].Rows.Last();
But I have this error:
Error CS1061 'DataRowCollection' does not contain a definition for 'Last' and no extension method 'Last' accepting a first argument of type 'DataRowCollection' could be found (are you missing a using directive or an assembly reference?)
How can I do that?