With the advent of .NET 2.0, this problem was solved; Microsoft introduced generics to the mix. The generic classes are instantiated once and then you can add to them as many times as you like. The framework itself does the memory management for the list, so they can be considered as an ever-extendable array.
In which case, why are they called generics as arrays have a definite type (
byte and so on)? The answer to that is the
type argument. A .NET generic takes a generic type (typically referred to as
T can be anything—even another generic (for example, there is nothing to stop you from having
List<Dictionary<T, List<U>>>, the caveat being that
U will need to be defined somewhere).
This obviously will mean ...