Method TrimExcess TrimExcess() Sets the capacity to match what it would be if it had been originally initialized with all its entries. Declaration public void TrimExcess()