M
moondaddy
In vb.net 1.1 I could do this:
Dim ds As dsEquip = GetDataset()
Dim dr As dsEquip.tbEquipRow
For Each dr In ds.tbEquip.Rows
'Do something
Next
now in c# 2.0 I'm trying to do the same thing like this:
dsEquip ds = oData.PersonGetRecShort();
foreach (dsEquip.tbEquipRow dr in (dsEquip.tbEquipRow)ds.tbEquip.Rows)
{
}
I get a compile error saying:
Error 1 Cannot convert type 'System.Data.DataRowCollection' to
'ClientDataLayer.dsEquip.tbEquipRow' F:\Data\Sample
Projects\WWF\myFormState\BusinessLayer\Persons_BLL.cs 53 63 BusinessLayer
Using c# 2.0, what's the correct way to loop through all the rows in
ds.tbEquip.Rows?
Thanks.
Dim ds As dsEquip = GetDataset()
Dim dr As dsEquip.tbEquipRow
For Each dr In ds.tbEquip.Rows
'Do something
Next
now in c# 2.0 I'm trying to do the same thing like this:
dsEquip ds = oData.PersonGetRecShort();
foreach (dsEquip.tbEquipRow dr in (dsEquip.tbEquipRow)ds.tbEquip.Rows)
{
}
I get a compile error saying:
Error 1 Cannot convert type 'System.Data.DataRowCollection' to
'ClientDataLayer.dsEquip.tbEquipRow' F:\Data\Sample
Projects\WWF\myFormState\BusinessLayer\Persons_BLL.cs 53 63 BusinessLayer
Using c# 2.0, what's the correct way to loop through all the rows in
ds.tbEquip.Rows?
Thanks.