What is the difference between the 2 namespaces:
1) systems.collections.list
2) systems.collections.generic.list
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Santhosh NRank #4,788 · 325 reputationPosted Dec 10, 2010, 2:15 AM EST
where as second contains gererics lists which are capable of handling automatic type casting capabilities..
Koteswararao MallisettiRank #2,740 · 511 reputationPosted Dec 10, 2010, 2:16 AM EST
dropdown list items ,stack, quee,trees etc
in the second namespace taht is system.collections.generic.list this will was restrict some items which is not matched with the type
stack
stack st
in this list we can perform unboxing to get the original value u have inserted type.
in the generic list there is no need to unboxing why because at the time of inserting we make that list as one predefined typed list
Chandra Sekhar K160 reputationPosted Dec 13, 2010, 2:00 AM EST
Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 13, 2010, 2:55 AM EST
Do one thing - Go to View -> Object Explorer -> Type the namespace name(System.Collections and System.Collections.Generic) and you can see the lists of items under respective namespace.
Thanks.....
Sam HobbsRank #107 · 20.5K reputationPosted Dec 13, 2010, 7:27 PM EST
The systems.collections namespace has collections that are not type-safe; they are more like the type of thing that VB (and other languages that are not type-safe) programmers are accustomed to. The items in a specific collection can be any object.
The collections in the systems.collections.generic namespace are type-safe; each specific instance of a generic collection will only allow the object type that is specified for that instance.
If you need a longer explanation, then please get a book or find articles about the language. A good book about C# will have ample explanations and samples.