This documentation is archived and is not being maintained.

SortedList Constructor

.NET Framework 1.1

Initializes a new instance of the SortedList class.

Overload List

Initializes a new instance of the SortedList class that is empty, has the default initial capacity and is sorted according to the IComparable interface implemented by each key added to the SortedList.

[Visual Basic] Public Sub New()
[C#] public SortedList();
[C++] public: SortedList();
[JScript] public function SortedList();

Initializes a new instance of the SortedList class that is empty, has the default initial capacity and is sorted according to the specified IComparer interface.

[Visual Basic] Public Sub New(IComparer)
[C#] public SortedList(IComparer);
[C++] public: SortedList(IComparer*);
[JScript] public function SortedList(IComparer);

Initializes a new instance of the SortedList class that contains elements copied from the specified dictionary, has the same initial capacity as the number of elements copied and is sorted according to the IComparable interface implemented by each key.

[Visual Basic] Public Sub New(IDictionary)
[C#] public SortedList(IDictionary);
[C++] public: SortedList(IDictionary*);
[JScript] public function SortedList(IDictionary);

Initializes a new instance of the SortedList class that is empty, has the specified initial capacity and is sorted according to the IComparable interface implemented by each key added to the SortedList.

[Visual Basic] Public Sub New(Integer)
[C#] public SortedList(int);
[C++] public: SortedList(int);
[JScript] public function SortedList(int);

Initializes a new instance of the SortedList class that is empty, has the specified initial capacity and is sorted according to the specified IComparer interface.

[Visual Basic] Public Sub New(IComparer, Integer)
[C#] public SortedList(IComparer, int);
[C++] public: SortedList(IComparer*, int);
[JScript] public function SortedList(IComparer, int);

Initializes a new instance of the SortedList class that contains elements copied from the specified dictionary, has the same initial capacity as the number of elements copied and is sorted according to the specified IComparer interface.

[Visual Basic] Public Sub New(IDictionary, IComparer)
[C#] public SortedList(IDictionary, IComparer);
[C++] public: SortedList(IDictionary*, IComparer*);
[JScript] public function SortedList(IDictionary, IComparer);

See Also

SortedList Class | SortedList Members | System.Collections Namespace

Show: