S
steve
Greetings,
I have a question about interfaces and inheritance. We are going to
create X number of classes that are going to doSomething (see below) cool
with typed datarows. I optimistically (stupidly) created an interface class
(iFoo) for all the usual reasons. I then though each implementation of iFoo
could use a typed DataRow because typed DataRows inherit from DataRow.
There is no IDataRow. It has been awhile but I could have sworn a design
like this would have worked in C++. Am I way off, missing something simple
or drinking too early? Thanks in advance.........
Will not compile. Error is that Foo does not implement
doSomething(DataRow).
interface iFoo
{
void doSomething(DataRow)
}
class Foo : iFoo
{
void doSomething(TypedDataRow)
{
// do something really cool here
}
}
I have a question about interfaces and inheritance. We are going to
create X number of classes that are going to doSomething (see below) cool
with typed datarows. I optimistically (stupidly) created an interface class
(iFoo) for all the usual reasons. I then though each implementation of iFoo
could use a typed DataRow because typed DataRows inherit from DataRow.
There is no IDataRow. It has been awhile but I could have sworn a design
like this would have worked in C++. Am I way off, missing something simple
or drinking too early? Thanks in advance.........
Will not compile. Error is that Foo does not implement
doSomething(DataRow).
interface iFoo
{
void doSomething(DataRow)
}
class Foo : iFoo
{
void doSomething(TypedDataRow)
{
// do something really cool here
}
}