So I see...

Another question on a slightly different matter. As I strife towards designing good programs, I often try to use polymorphism as often as I can. And one way to implement polymorphism is to make use of interfaces.

For example, I have a method within a class that is called PrintResults (asp.net) which takes a datareader INTERFACE as in parameter, and then spit out the results with Response.writes...

I also have a method which is called GetResults, which fetch information from a database (with factory patter for dbconn) and store it in a datareader. I then return the INTERFACE of this datareader.


Is this the correct way to implement polymorphism? When should I work with interfaces instead of ordinary objects?

kind regards
Henrik