Saturday, April 26, 2008

Generic Collection

List : Equivalent to Arraylist of NonGeneric collection
Unlike Arraylist, can store value type as well
You need to specify datatype.
Uses List.Enumertor for iteration.
e.g. Listnames = new List ();
dim names as List = new List(of String)

Generic Stack : Equivalent to Non generic Stack but you specify a datatype
Use Push to add
Use Pop to remove element

Generic Queue:
Enqueue to add element
Dequeue to remove element

LinkedList : Createss and manage a strongly typed doubly linked list.
Every node contains reference to the previous and next nodes in the list.

No comments:

 
Google