SortedList<T> Class
public sealed class SortedList<T> : ICollection<T>, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection, IEnumerableType parameters
T
No documentation is available.
Nested types
| Name | Description |
|---|---|
| SortedList<T>.Enumerator |
Constructors
| Name | Description |
|---|---|
| SortedList() | |
| SortedList(IComparer<T>?) | |
| SortedList(int) | |
| SortedList(int, IComparer<T>?) |
SortedList overloads
SortedList()
SortedList.cspublic SortedList()No documentation is available.
SortedList(IComparer<T>?)
SortedList.cspublic SortedList(IComparer<T>? comparer)Parameters
comparerIComparer<T>?
No documentation is available.
SortedList(int)
SortedList.csSortedList(int, IComparer<T>?)
SortedList.csParameters
capacityintcomparerIComparer<T>?
No documentation is available.
Properties
| Name | Description |
|---|---|
| Capacity | |
| Count | |
| System.Collections.Generic.ICollection<T>.IsReadOnly | |
| System.Collections.ICollection.IsSynchronized | |
| System.Collections.ICollection.SyncRoot |
Capacity
SortedList.csCount
SortedList.csSystem.Collections.Generic.ICollection<T>.IsReadOnly
SortedList.csSystem.Collections.ICollection.IsSynchronized
SortedList.csSystem.Collections.ICollection.SyncRoot
SortedList.csIndexers
| Name | Description |
|---|---|
| this[int] |
this[int]
SortedList.csMethods
Add(T)
SortedList.csAddRange(IEnumerable<T>)
SortedList.csAdds the items of a collection to the list.
public void AddRange(IEnumerable<T> items)Parameters
itemsIEnumerable<T>- The items to add.
Remarks
The new items are sorted, then merged with the existing items. This is faster than calling SortedList<T>.Add for each item when adding many items.
BinarySearch(T)
SortedList.csClear()
SortedList.cspublic void Clear()No documentation is available.