Why is the .NET list implemented via an array?
ICollection<T> c = collection as ICollection<T>; if( c != null ) { // if collection is ICollection<T> int count = c.Count; if (count > 0) { EnsureCapacity(_size + count); if (index < _size) { Array.Copy(_items, index, _items, index + count, _size - index); } Upon reaching the array boundary, the elements are copied to the new array.
Is it not less productive than traditional lists, where a new element is added to the end, and the last penultimate element begins to point to a new element?
capacity) - Andrey NOP