Collection Classes From the last two week's labs you may have already identified some issues related to arrays. We learnt that arrays holds identically typed items. However there are instances when you may requires a more flexible data structure that is capable of growing dynamically without throwing an exception (IndexOutOfRangeException) as in the case of an array. .NET framework's System.Collection classes provides a number of builtIn data structures that are dynamic and typesafe. Some of these classes are generic and others are non-Generic. Generic classes are more typesafe and requires a "type parameter" to be specified. Whereas, the non-generic classes are very loosely typed and should be avoided if possible. Non-Generic Classes System.Collections namespace consists of following non generic classes: ArrayList Queue Stack HashTable SortedList BitArray Issues related to non-generic classes: Slower executions speed: Can be slower ...
Education for everyone!