New answers tagged

1

I think the worst part of the interface is the fact that there is temporal coupling. Clients of the interface are expected to call methods in the right order, and this order isn't enforced by the type system, so it can only be infered by trial-and-error or by pre-existing domain knowledge. My initial thought is to keep a clean separate interface for the ...


0

There are various ways to do this: As mentioned in the comments: an extension method could accomplish the same thing If you want to continue with the interface approach but are concerned about FooBase having a dependency on Bar, you could implement the interface in FooA and FooB so that only they have a dependency on Bar (which is an actual dependency). ...



Top 50 recent answers are included