Understanding the different collection offerings
A collection is a group of records that can be treated as one logical unit. Examples of logical record groups include people, countries, products, ingredients, books, authors, and more.
There are four main types of collections, as follows:
- Index-based collections, such as an array or list. Index-based collections contain an internal index. The index can be either numeric or string-based. An index-based collection is more commonly accessed using a numerical index. Numerical indexes are zero-based. This means that a collection's index will start at zero for the first record and increase in value by the order of one for each subsequent record. Collections that can be accessed using numerical indexes include arrays and lists.
- Key/value pair collections, such as a hash table or sorted list. Key/value pair collections such as
Hashtable
andSortedList
use a key to look up the value stored in a collection. So, for example...