| Different ways to work with collection and there namespaces in c#
There are 3 ways to work with collections in C# and below are the 3 namespaces.
(1)System.Collections.Generic classes
(2)SYstem.Collections classes
(3)System.Collections.Concurrent classes
(1)System.Collections.Generic classes:-Below are the different classes in System.Collections.Generic
(1)List
(2)Stack
(3)Queue
(4)LinkedList
(5)HashSet
(6)SortedSet
(7)Dictionary
(8)SortedDictionary
(9)SortedList
(2)SYstem.Collections classes:-These are legacy classess. And below are the classes in above namespaces
(1)ArrayList
(2)Stack
(3)Queue
(4)Hashtable
(3)System.Collections.Concurrent classes:-This offers classes for thread-safe operations. And now multiple threads will not create problem for accessing the collection items.
(1)BlockingCollection
(2)ConcurrentBag
(3)ConcurrentStack
(4)ConcurrentQueue
(5)ConcurrentDictionary
(6)Partitioner
(7)Partitioner
(8)OrderablePartitioner | | |