c# - Why would an interface implement another interface? -


I list & lt; T & gt; was seen and it was seen by the iiLIT & lt; T & gt; , Icicleing & lt; T & gt; and IEnumerable & lt; T & gt; (among others)

Then I will call IList & lt; T & gt; Went to see the definition of and found that it was in the icon selection & lt; T & gt; and IEnumerable & lt; T & gt; .

If they work as "contracts" and we do not write the real code on them, then what does the interface implementing another interface mean? Is this implementation cumulative? If so, then IList & lt; T & gt; implies iconaching & lt; T & gt; and IEnumerable & lt; T & gt; , list & lt; T & gt; Only IList on T & gt;

Should not be sorry, if my question is confused, then I am just confused.

If they act as "contracts" and we have no real code What does it mean to implement an interface to another interface?

Interface support the heritage and provide the same type of polymorphism as climes. A iialit & lt; T & gt; also a ICollection & lt; T & gt; , in the same way that textbox is a control .

Is this implementation cumulative? If this is the case, because the ilk has implemented the ILO and IEnemable, then should not the ILIIT apply only to the list?

As others have said, it is mostly for readability and maintenance. Yes, legacy is cumulative but, when a class applies several interfaces in which the members are equal signatures, then only a member needs to define a member. Can be used to clearly define the member for any implementation.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -