Coffeehouse Post

Single Post Permalink

View Thread: C#'s biggest mistake
  • User profile image

    Yes, the non generic collections can be useful sometimes but in many (all?) cases you can achieve the same results by using a generic collection with an object type argument (List<object>  for example).

    Now, the existence of the non generic collections is not a big issue. The problem is with framework APIs that are still using non generic interfaces (see for example the PropertyDescriptorCollection in System.ComponentModel which implements IList & co.)

    PS: AFAIK "Array" was dropped from List<T> because it unnecessarily exposes an implementation detail (a list is implemented by using an array).