collection

An object that holds a group of items, such as a list, dictionary, set or array.

In more detail

Languages provide several kinds, each suited to a different question: by position, by key, by membership, or a fixed size. A list keeps items in order, a set holds unique items with fast membership tests, and a dictionary looks values up by key. Picking the right one keeps lookups fast and code clear.

Example

.NET: List<T>, Dictionary<TKey, TValue>, HashSet<T>, T[]

Related terms

Taught in

References

Certification courses