<PackageReference Include="System.Collections.NonGeneric" Version="4.0.1-beta-23409" />

SortedList

Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.
public virtual int Capacity { get; set; }

Gets or sets the capacity of a SortedList object.

public virtual int Count { get; }

Gets the number of elements contained in a SortedList object.

public virtual bool IsFixedSize { get; }

Gets a value indicating whether a SortedList object has a fixed size.

public virtual bool IsReadOnly { get; }

Gets a value indicating whether a SortedList object is read-only.

public virtual bool IsSynchronized { get; }

Gets a value indicating whether access to a SortedList object is synchronized (thread safe).

public virtual object this[object key] { get; set; }

Gets and sets the value associated with a specific key in a SortedList object.

public virtual ICollection Keys { get; }

Gets the keys in a SortedList object.

public virtual object SyncRoot { get; }

Gets an object that can be used to synchronize access to a SortedList object.

public virtual ICollection Values { get; }

Gets the values in a SortedList object.

public SortedList()

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 object.

public SortedList(int initialCapacity)

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 object.

public SortedList(IComparer comparer)

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.

public SortedList(IComparer comparer, int capacity)

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.

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.

public SortedList(IDictionary d, IComparer comparer)

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.

public static SortedList Synchronized(SortedList list)

Returns a synchronized (thread-safe) wrapper for a SortedList object.

public virtual void Add(object key, object value)

Adds an element with the specified key and value to a SortedList object.

public virtual void Clear()

Removes all elements from a SortedList object.

public virtual object Clone()

Creates a shallow copy of a SortedList object.

public virtual bool Contains(object key)

Determines whether a SortedList object contains a specific key.

public virtual bool ContainsKey(object key)

Determines whether a SortedList object contains a specific key.

public virtual bool ContainsValue(object value)

Determines whether a SortedList object contains a specific value.

public virtual void CopyTo(Array array, int arrayIndex)

Copies SortedList elements to a one-dimensional Array object, starting at the specified index in the array.

public virtual object GetByIndex(int index)

Gets the value at the specified index of a SortedList object.

Returns an IDictionaryEnumerator object that iterates through a SortedList object.

public virtual object GetKey(int index)

Gets the key at the specified index of a SortedList object.

public virtual IList GetKeyList()

Gets the keys in a SortedList object.

public virtual IList GetValueList()

Gets the values in a SortedList object.

public virtual int IndexOfKey(object key)

Returns the zero-based index of the specified key in a SortedList object.

public virtual int IndexOfValue(object value)

Returns the zero-based index of the first occurrence of the specified value in a SortedList object.

public virtual void Remove(object key)

Removes the element with the specified key from a SortedList object.

public virtual void RemoveAt(int index)

Removes the element at the specified index of a SortedList object.

public virtual void SetByIndex(int index, object value)

Replaces the value at a specific index in a SortedList object.

public virtual void TrimToSize()

Sets the capacity to the actual number of elements in a SortedList object.