---
title: "System::Collections::Generic::SortedList::SortedList constructor"
url: "https://reference.aspose.com/pdf/cpp/system.collections.generic/sortedlist/sortedlist/"
product: "Aspose.PDF for C++ API Reference"
description: "System::Collections::Generic::SortedList::SortedList constructor. Constructs empty list in C++."
---

## SortedList::SortedList() constructor


Constructs empty list.

```cpp
System::Collections::Generic::SortedList<TKey, TValue>::SortedList()
```

## See Also

* Class [SortedList](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## SortedList::SortedList(const map_t\&) constructor


Copy constructor.

```cpp
System::Collections::Generic::SortedList<TKey, TValue>::SortedList(const map_t &map)
```


| Parameter | Type | Description |
| --- | --- | --- |
| map | const map_t\& | Map tp copy data from. |

## See Also

* Typedef [map_t](../map_t/)
* Class [SortedList](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## SortedList::SortedList(const SharedPtr\<IComparer\<TKey\>\>\&) constructor


Constructs empty list.

```cpp
System::Collections::Generic::SortedList<TKey, TValue>::SortedList(const SharedPtr<IComparer<TKey>> &comparer)
```


| Parameter | Type | Description |
| --- | --- | --- |
| comparer | const SharedPtr\<IComparer\<TKey\>\>\& | [Comparer](../../comparer/) to use. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [IComparer](../../icomparer/)
* Class [SortedList](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## SortedList::SortedList(const SharedPtr\<IDictionary\<TKey, TValue\>\>\&) constructor


Copy constructor.

```cpp
System::Collections::Generic::SortedList<TKey, TValue>::SortedList(const SharedPtr<IDictionary<TKey, TValue>> &src)
```


| Parameter | Type | Description |
| --- | --- | --- |
| src | const SharedPtr\<IDictionary\<TKey, TValue\>\>\& | [Dictionary](../../dictionary/) to copy data from. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [IDictionary](../../idictionary/)
* Class [SortedList](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## SortedList::SortedList(int) constructor


Constructs empty list.

```cpp
System::Collections::Generic::SortedList<TKey, TValue>::SortedList(int capacity)
```


| Parameter | Type | Description |
| --- | --- | --- |
| capacity | int | Number of elements to reserve. |

## See Also

* Class [SortedList](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
