Hello Rob,
In general, an interface can be coupled to a type if that type is used as a
parameter or return type in the interface. Therefore, if one of the types
that your interface exposes, either as a parameter or as a returned type, is
a sealed type, then you have an interface that is not open for extension.
Technically, this means that the interface cannot ultimately demonstrate the
open-closed principle (that an object is open for extension but closed for
modification).
Note that most of the intrinsic types in .Net are sealed types, including
String. Personally, I find this irritating because, in my opinion, a URL is
a specialized string (for example) but it cannot be expressed as such.
Therefore, most of our interfaces suffer in some sense or another from this
kind of pernicious coupling.
As far as coupling to a specific or a generic type: technically any type
that is not sealed can be a generic type. However, the intention is to say
that binding to an abstract type or another interface is, on the surface,
"better" because any of the classes that implement the interface have
flexibility about what concrete type to return.
I'll be honest: I don't find this last bit of argument all that compelling,
and I would judge the other principles, as well as a clean use of patterns,
to be a better approach than evaluating a design solely on the basis of
coupling to an interface.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.