Method TrimExcess TrimExcess() Reduces the internal capacity to the number of entries in the collection plus ExtraTrimCapacity. Declaration public void TrimExcess()