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 Constructor (Int32)

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
);

Parameters

initialCapacity
The initial number of entries that the SortedList can contain .

Exceptions

Exception Type Condition
ArgumentOutOfRangeException initialCapacity is less than zero.

Remarks

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.

See Also

SortedList Class | SortedList Members | System.Collections Namespace | SortedList Constructor Overload List | IComparable | Capacity