lundi 24 août 2015

In C#, if A implements IX and B inherits from A , does it necessarily follow that B implements IX?

In C#, if A implements IX and B inherits from A , does it necessarily follow that B implements IX? if yes is it because of LSP ? are there any differences between :

1.

Interface IX;
Class A : IX;
Class B : A;

and

2.

Interface IX;
Class A : IX;
Class B : A, IX;

?

Is there a terminology associated with B implementing IX though the chain of inheritance or B implementing IX directly?

PS: I am Assuming in both cases the interface is implemented implicitly, not explicitly. Any Patterns that utilize on 1 and would not work if they were implemented as in 2?

Aucun commentaire:

Enregistrer un commentaire