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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Dec 14, 2010, 12:27 AM
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.
Subhendu DePosted Dec 13, 2010, 7:55 AM
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.....
Chandra Sekhar KPosted Dec 13, 2010, 7:00 AM
Koteswararao MallisettiPosted Dec 10, 2010, 7:16 AM
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
Santhosh NPosted Dec 10, 2010, 7:15 AM
where as second contains gererics lists which are capable of handling automatic type casting capabilities..