VB to C# issue

  • Thread starter Thread starter Arvi
  • Start date Start date
A

Arvi

Hi,

im converting a VB web app to a C#.



i have problem with the following line

ds.Tables[0].Rows[ind].Item["taskid"]

ERROR - 'System.Data.DataRow' does not contain a definition for 'Item'

whats the alternate that i can use?

please let me know


Thanks
 
Arvi said:
i have problem with the following line

ds.Tables[0].Rows[ind].Item["taskid"]

ERROR - 'System.Data.DataRow' does not contain a definition for 'Item'

whats the alternate that i can use?

Try this:
ds.Tables[0].Rows[ind]["taskid"]
 
Arvi said:
Hi,

im converting a VB web app to a C#.



i have problem with the following line

ds.Tables[0].Rows[ind].Item["taskid"]

ERROR - 'System.Data.DataRow' does not contain a definition for 'Item'

whats the alternate that i can use?

please let me know

without trying it I would presume you just drop the .Item

ds.Tables[0].Rows[ind]["taskid"]
 
Arvi,

In addition to the others in VB.Net you can drop that "item" as well, it is
the default property.

Cor
 
Thanks a lot.


Cor Ligthert said:
Arvi,

In addition to the others in VB.Net you can drop that "item" as well, it
is the default property.

Cor

Arvi said:
Hi,

im converting a VB web app to a C#.



i have problem with the following line

ds.Tables[0].Rows[ind].Item["taskid"]

ERROR - 'System.Data.DataRow' does not contain a definition for 'Item'

whats the alternate that i can use?

please let me know


Thanks
 
Back
Top