Interface for System.Data.DataSet

  • Thread starter Thread starter David McKenzie
  • Start date Start date
D

David McKenzie

I am reposting for a coworker.
His post follows:

I'm working with DataSets in my code and cannot find a suitable Interface to
reference.

As a work-around, I've written an Interface (IDataSet) that defines all of
the public method signatures of a DataSet class. A custom class (DataSetExt)
implements that Interface and delegates public method calls to *base*.

I know that in taking this approach I've left myself open to a slew of
potential problems especially if the signatures of the DataSet class change.
However, the System.Data.DataSet class has no primary interface....????

Any thoughts on this?

What we are looking for is some sort of response like
"Yes that is the way to approach this problem"
or
"What are you nuts!?! - that interface will be broken 9 ways from sunday
every time a Microsoft developer sneezes"
 
People did respond to the original post.

I don't think those responses saw any benefit in have an IDataSet interface,
since interfaces are meant for objects that have only behavior in common,
the don't have an 'is a' relationship. But what are examples of 2 different
objects that implement IDataSet that have nothing in common but their
methods?

You mention you want a response regarding if this is the right away to
approach the problem - what is the problem? Why is an interface necessary?
 
People did respond to the original post.

I don't think those responses saw any benefit in have an IDataSet
interface, since interfaces are meant for objects that have only
behavior in common, the don't have an 'is a' relationship.

errr?
Interfaces are added because they are used for multiple type
inheritance, the only multiple inheritance version implemented in .NET.
Interfaces therefore define is-a relationships, it's due to interfaces that
an object can participate in multiple is-a inheritance trees in the single
inheritance .NET environment.

FB
 
Back
Top