subclass DataRow problem

S

Steve Richter

I would like to subclass the DataRow class:
class CustomerMasterRow : public System.Data.DataRow
{
public string CustomerName
{
get { return base.ItemArray(1) ; }
}
}

the idea being that each column in the row would be accessed thru a
property.

But I get a compile error right off the bat:
No overload for method 'DataRow' takes '0' arguments

can I encapsulate the DataRow the way I want to, so that I can use
properties to access the columns of the row?

thanks,
-Steve
 
E

Elton Wang

Hi Steve,

It suppose to be ItemArray[1].


HTH

Elton Wang
(e-mail address removed)
 

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

Top