c# - Collection <T> class location in the .net framework -


the collection <t> class exists under system.collections.objectmodel namespace. why not exist under system.collections.generic instead?

it's because:

the system.collections.objectmodel namespace contains classes can used collections in object model of reusable library. use these classes when properties or methods return collections.

and collection<t> can used collection in object model of reusable library.

see https://msdn.microsoft.com/en-us/library/system.collections.objectmodel(v=vs.110).aspx

the full explanation here: https://blogs.msdn.microsoft.com/kcwalina/2005/03/15/the-reason-why-collection-readonlycollection-and-keyedcollection-were-moved-to-system-collections-objectmodel-namespace/

(that appears explain real reason, if ask me...)


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -