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.
 
Thank you. You were right.

W.G. Ryan eMVP said:
It looks like you're using an instance type for the row. Instead of using
the instance, use the Type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top