Collections means the process of which the objects are handled by your program.it holds a set of classes to have elements in a generalized form.By using collections,you can perform Various operations on objects like the store,search,sort,retrieve, update,delete etc.
There are following types of classes in collection, here are shown below.
In this classes we use System.Collections.Generic namespace.These Collections are used for type-compatible with the type of collections for items that are stored in generic collection.This collection have set of interfaces and classes. here we show classes that are used in System.Collections.Generic namespace.
||It is used to fast removing and inserting of elements.it uses enumerators.|
||It is used to store key/value pairs.it used the same functionality that is used in non-generic hashtable class.|
||It use first-in,first-out list.it's functionality similar to that occur in non-generic queue class.|
||It is used to prevent duplication in the collection.it is an collection of the unique elements in unordered form.|
||it uses the functionality similar to that occur in non-generic sortedlist class.it is key/value pair of sorted list.|
||it uses First-in,last-out list.|
In this Non-Generic collection we use System.Collections namespace. it is not used for type-compatible with the type of collections for items.It can handle any type of objects.This collection have set of interfaces and classes. here we show classes that are used in System.Collections namespace.
|ArrayList||ArrayList means size of array is dynamic not fixed.it's size increase and decrease at runtime.|
|Queue||Queue shows first-in,first-out collection of objects.you can use in first-in,first-out access of items.|
|Hashtable||Hashtable shows collection of key/value pairs.it is based on hash code of the key.|
|Stack||stack is used last-in,first-out pattern(LIFO pattern) for input/output.|
In this collections multiple threads are accessing the collection simultaneously.it gives several threads-safe collection classes that are used in System.Collections.Concurrent namespace. This collection came in dot net framework version 4 and onwards.