Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8480341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:16:08+00:00 2026-06-10T19:16:08+00:00

After all the fuss about non-generic classes being obsolete (well almost) why are .NET

  • 0

After all the fuss about non-generic classes being obsolete (well almost) why are .NET collection classes still non-generic? For instance, Control.ControlCollection doesn’t implement IList<T> but only IList, or FormCollection implements only upto ICollection and not ICollection<T>. Everytime I have to do some cool operation available on IEnumerable<T> or avail Linq niceties, I have to invariably convert the collection classes to its equivalent generic type like this:

this.Controls.OfType<Control>();

Its weird to have to specify Control in an operation like this on ControlCollection when the only thing it can hold is again a Control.

Is it to maintain backward compatibility, considering these collections existed back in .Net 1.1 days? Even if it is, why cant these collections (there are many many more) further implement generic interfaces along with the existing ones which I believe wouldnt break backward compatibility. I am unsure if I am missing something key to generics, may be I am not thorough with the idea..

Edit: Though I asked this when I had only WinForms in mind, I find this applies to newer technologies like WPF too. As @Dennis points out WPF too has non-generic collections. For instance WindowCollection or the ItemCollection. WPF was released along .NET 3, but generics was introduced in .NET 2 😮

Update to this:

There is a ticket for this now: https://github.com/dotnet/winforms/issues/2644 (.NET Core of course).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:16:09+00:00Added an answer on June 10, 2026 at 7:16 pm

    Is it to maintain backward compatibility, considering these collections existed back in .Net 1.1 days?

    Yes, but mostly because WinForms has been ‘Feature Complete’ since 2005 or even earlier.

    Feature Complete means it’s on life-support, just short of do-not-resuscitate.

    Additonal, re the Edit:

    The WindowsCollection is already ‘specialized’, it contains classes derived from Window. Inheritance is the right model here, generics are not called for.

    And the ItemCollection is intentionally non-generic as well. It is a deliberate feature that it can contain all types, even different types at the same time. Again, generics is not necessary and not desirable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

after reading all posts that come close to this, I still find no solution
After all the answers to my last question about fine-tuning turned out to be
After all these years, I still haven't learned CSS layout, so bear with me.
After all the latest news and talk about HTML5, I would like to know
After all those mod rewrite topics here at stackoverflow, I still haven't find an
I need to determine, after all files have been included, which classes extend a
After all what I have read about Dependency Injection and IoC I have decided
Well after getting all the help I could ever hope for, from you guys
After all the hussle about Rails 3 , can I, after all, painlessly use
It is Hallowe'en after all. Here's the problem: I'm maintaining some old-ish J2EE code,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.