typed DataRow

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm using VS2003 C#

I'd like to use a typed dataRow in an iteration by using the TableRow
property of the Dataset so that I can use the instance to directly access the
col. for example:

foreach (dsmyDataSet.myTableRow tr in dsmyDataSet.myTable)
{
TreeNode myNode = new TreeNode(tr.RowCol);
}

I get an error saying it denotes a field where a class was expected. Isn't
the 'myTableRow' a class?

How can I do this?

Many thanks for input in advance
Ant
 
It looks like you're using an instance type for the row. Instead of using
the instance, use the Type.
 
Back
Top