Junior Collections

What is the Capacity property in a List<T>?

Capacity is the number of elements the list can hold before resizing. It is greater than

or equal to Count.

Example:

list.Capacity = 100; // Optional performance tuning

More from C# Programming Tutorial

All questions for this course