1
Reply

Interface chaining (?) - Is it acceptable.

csharp

csharp

18 years ago
2.1k
I cannot find any information on this - perhaps because it has a name/term I am not aware of.

Basically I have the following structure:

IBaseClassInterface (methods A, B)
IInheritedClassInterface (methods C)

BaseClass <implements> IBaseClassInterface (and the methods A and B)
InheritedClass <inherits> BaseClass <implements> IInheritedClassInterface (and method C)


now if I use the IInheritedClassInterface I cannot access methods A and B.

However: I found that I can make IInheritedClassInterface "inherit" IBaseClassInterface, and can then access the base methods A and B.

I call it interface chaining, but is it a good design practice?  If not why?

Cheers,

Andrew

Answers (1)