List<T> derives from the following interfaces:
public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
I just wonder, why it needs all these interfaces (in the class declaration)?
IList itself already derives from ICollection<T>, IEnumerable<T> und IEnumerable.
So why is the following not enough?
public class List<T> : IList<T>, IList
I hope you can solve my confusion.
Indeed
List<T>would have just implemented like thisIt is the reflector or such decompiler shows you all the interfaces in inheritance.
Try this
I just compiled this and viewed in reflector, which shows like this