Tuesday 7 May 2013

Collections

     Arrays are simple data structures used to store data items of a specific type Although commonly used, arrays have limited capabilities. For instance you must specify an array size, and if at execution time you wish to modify it you must do so by creating a new array or by using array classes resize method, which creates a new array and copies the existing elements into the new array.
     Collections are a set of prepackaged data structures that offer greater capability than traditional arrays. They are reusable, reliable, powerful and efficient and have been carefully designed and tested to ensure quality and performance. Collections are similar to arrays but provide additional functionalities, such as dynamic resizing - They automatically increase their size at execution time to accommodate additional elements, inserting of new elements, removing of existing elements etc.
     Initially .net introduces so many collection classes under the namespace System.Collections like Stack, Queue, LinkedList, SortedList, ArrayList etc.