Description of the relationship between interfaces

Consider this interface in FCL:

public interface IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable

He tells us: Interface IList<T>[XXX] 3 interface: IConnection<T>, IEnumerable<T>and IEnumerable. I have a choice for [XXX]:

(1) comes from / inherits

This parameter comes from the C # language specification (but not directly), where the word "multiple inheritance interfaces" appears several times. The reason I don't like this: using the word "inherit", we have: IEnumerable<T>inherits IEnumerable, ICollection<T>inherits both IEnumerable<T>, and IEnumerablethen IList<T>inherits all three. Something is wrong, but I can’t say very bad feelings.

(2) implements

This is also a bad option. Since the implementation is not executed, this is only a contract.

(3) something else? I'd like to know

What is your idea?

+3
source share
3 answers

I would say that IList<T> includes ICollection<T> , IEnumerable<T>andIEnumerable

Alternatively, I can say that expands

+2
source

I used "Extends" for this. Maybe a bit of Java ish, but it seems appropriate to me. An interface that has a superinterface can reasonably be said to “extend” this interface because it must add something to it (optional or finite, but there are not many reasons. Besides, perhaps, semantic reasons, re is still expanding semantically )

+3
source

, . , ?

, :

  • , , , . , , "" " " . , .
  • .

, "", , , . - , .

0

All Articles