March 2016
Intermediate to advanced
550 pages
10h 57m
English
If you need to store multiple values, you can use a collection. A collection is a data structure in memory that can manage multiple items in different ways, although all collections have some shared functionality.
There are two main namespaces for collections:
System.Collections: Avoid the types in this namespace because they store any type that derives from System.Object, that is, every type (which is flexible but not type safe, thus leading to errors and boxing of value types, which can be slow and inefficient).System.Collections.Generic: The types in this namespace were introduced in C# 2 with .NET 2.0 and are better because they allow you to specify the type you want to store (which is safer, faster, and more efficient). ...Read now
Unlock full access