I have taken a look on IList<T>
and ICollection<T>
on MSDN by chance, and see that the definition of these two interfaces are:
public interface ICollection<T> : IEnumerable<T>, IEnumerable
public interface IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable
Notice that ICollection<T>
inherits from IEnumerable<T>
and IEnumerable
, that's okay. IList<T>
inherits from ICollection<T>
, but why IList<T>
has to inherit IEnumerable<T>
and IEnumerable
again?
Any there any reason for this?