|There is List<T>.Capacity[^]. You can add elements till Count equals Capacity before the internal array gets resized automatically. This[^] might interest you.
There isn't a Capacity for hash-based collections, as it wouldn't be very meaningful; what can be added to a Dictionary, without growing it, depends on the current situation of the buckets and the hash value of the new entries.
[ADDED AFTER OP GOT MODIFIED]
Yes, a collection of reference types stores references.
Form.Controls contains the (references to) the Controls of a Form, storing a copy of the Controls would be quite useless as the copy would become stale pretty soon, and changing a property would be irrelevant to the Form.
As far as storage goes, there are three types of collections:
- the regular ones, not hash-based, such as List, SortedList, Set, ...; they internally have a single array.
- the dictionary ones, based on hashing; they use a more complex scheme to improve the search performance.
- the linked-list ones; they store individual items, without using arrays.
If you're interested, google "skip list" and/or read A Skip List in C#[^]
Luc Pattyn [Forum Guidelines] [My Articles]
Nil Volentibus Arduum
Please use <PRE>
tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.