1

I recently noticed that all arrays in C# inherit from the IList interface but you can't really handle an array like a standard list.

Why was this inheritance introduced in .net and C#

Alecu
  • 2,627
  • 3
  • 28
  • 51

1 Answers1

3

It is often useful to be able to pass any IList to some algorithm. That algorithm might just care about being able to index into this collection. Many things fulfill this requirement: Arrays, List<T>, many custom collections.

usr
  • 168,620
  • 35
  • 240
  • 369