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,427
  • 2
  • 26
  • 48

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
  • 165,323
  • 34
  • 234
  • 359