B
Bradley
Hi,
I understand that a DataTable has a collection of Rows. If it is a collection, why is there no obvious way to get an index property from any given row?
Example code:
....
int myIndex;
foreach (DataRow myDataRow in myDataTable.Rows)
{
// I need to get the zero-based index here:
myIndex = myDataRow.index?
....
}
....
I don't know if an iEnumerator (or something like it) is required, or how to use it because of my lack of experience in this area. Can anyone help?
Thanks! Bradley
I understand that a DataTable has a collection of Rows. If it is a collection, why is there no obvious way to get an index property from any given row?
Example code:
....
int myIndex;
foreach (DataRow myDataRow in myDataTable.Rows)
{
// I need to get the zero-based index here:
myIndex = myDataRow.index?
....
}
....
I don't know if an iEnumerator (or something like it) is required, or how to use it because of my lack of experience in this area. Can anyone help?
Thanks! Bradley