Creates an empty SortedList with the specified initial capacity, sorted according to the IComparable interface implemented by each key added to the SortedList.
[Visual Basic] Overloads Public Sub New( _ ByVal initialCapacity As Integer _ ) [C#] public SortedList( int initialCapacity ); [C++] public: SortedList( int initialCapacity ); [JScript] public function SortedList( initialCapacity : int );
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | initialCapacity is less than zero. |
When adding elements to the list and the number of elements exceeds the capacity, the capacity is doubled.
The elements are sorted according to the IComparable implementation of each key added to the SortedList.
SortedList Class | SortedList Members | System.Collections Namespace | SortedList Constructor Overload List | IComparable | Capacity