Collections are a set of predefined data structures that offer greater capabilities than arrays.
Collections are like arrays but provide extra functions such as dynamic resizing which means automatically
increases their size for the newer elements, inserting new elements and removing existing
elements etc.
There are many collection classes like Stack, Queue, ArrayList, HashTable, SortedList, BitArray under
System.Collection namespace.
These Collections are classified as non-generic and generic.
Non-generic collection means the collection can hold the different data types whereas generic collection
holds only a specific data type of data list.
Non Generic Collections (System. Collections) |
Generic Collections (System.Collections.Generic) |
Stack |
Stack |
Queue |
Queue |
ArrayList |
List |
Hashtable |
Dictionary |