NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

SortedList.TrimToSize

Sets the capacity to the actual number of elements in the SortedList.

[Visual Basic]
Overridable Public Sub TrimToSize()
[C#]
public virtual void TrimToSize();
[C++]
public: virtual void TrimToSize();
[JScript]
public function TrimToSize();

Return Value

None.

Remarks

This method can be overridden by a derived class.

This method can be used to minimize a list's memory overhead if no new elements would be added to the list.

To completely clear all elements in a list, call the Clear method before calling TrimToSize.

See Also

SortedList Class | SortedList Members | System.Collections Namespace | Clear | Capacity