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.)

    I'd like to see .DataSource properties (typed as Object) replaced with a more stronger-typed alternative. The documentation lists what interfaces are accepted, so why not put that in the code?