/// <summary> /// Sets the capacity to the actual number of elements in the list, /// if that number is less than a threshold value. /// </summary> public static void TrimExcess(SystemGenerics.List <T> list) { (list as Mock)?.CheckDataRace(true); list.TrimExcess(); }