SortedList Members
.NET Framework 2.0
Represents a collection of key/value pairs that are sorted by key based on the associated IComparer implementation.
The following tables list the members exposed by the SortedList generic type.
| Name | Description | |
|---|---|---|
| Capacity | Gets or sets the number of elements that the SortedList can contain. |
| Comparer | Gets the IComparer for the sorted list. |
| Count | Gets the number of key/value pairs contained in the SortedList. |
| Item | Gets or sets the value associated with the specified key. |
| Keys | Gets a collection containing the keys in the SortedList. |
| Values | Gets a collection containing the values in the SortedList. |
(see also
Protected Methods
)
Top
| Name | Description | |
|---|---|---|
| Add | Adds an element with the specified key and value into the SortedList. |
| Clear | Removes all elements from the SortedList. |
| ContainsKey | Determines whether the SortedList contains a specific key. |
| ContainsValue | Determines whether the SortedList contains a specific value. |
| Equals | Overloaded. Determines whether two Object instances are equal. (inherited from Object) |
| GetEnumerator | Returns an enumerator that iterates through the SortedList. |
| GetHashCode | Serves as a hash function for a particular type. (inherited from Object) |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| IndexOfKey | Searches for the specified key and returns the zero-based index within the entire SortedList. |
| IndexOfValue | Searches for the specified value and returns the zero-based index of the first occurrence within the entire SortedList. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| Remove | Removes the element with the specified key from the SortedList. |
| RemoveAt | Removes the element at the specified index of the SortedList. |
| ToString | Returns a String that represents the current Object. (inherited from Object) |
| TrimExcess | Sets the capacity to the actual number of elements in the SortedList, if that number is less than 90 percent of current capacity. |
| TryGetValue | Gets the value associated with the specified key. |
| Name | Description | |
|---|---|---|
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object) |
| Name | Description | |
|---|---|---|
| System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Add | Adds a key/value pair to the ICollection. |
| System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Contains | Determines whether the ICollection contains a specific element. |
| System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index. |
| System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Remove | Removes the first occurrence of a specific key/value pair from the ICollection. |
| System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>.GetEnumerator | Returns an enumerator that iterates through a collection. |
| System.Collections.ICollection.CopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index. |
| System.Collections.IDictionary.Add | Adds an element with the provided key and value to the IDictionary. |
| System.Collections.IDictionary.Contains | Determines whether the IDictionary contains an element with the specified key. |
| System.Collections.IDictionary.GetEnumerator | Returns an IDictionaryEnumerator for the IDictionary. |
| System.Collections.IDictionary.Remove | Removes the element with the specified key from the IDictionary. |
| System.Collections.IEnumerable.GetEnumerator | Returns an enumerator that iterates through a collection. |
| System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.IsReadOnly | Gets a value indicating whether the ICollection is read-only. |
| System.Collections.Generic.IDictionary<TKey,TValue>.Keys | Gets an ICollection containing the keys of the IDictionary. |
| System.Collections.Generic.IDictionary<TKey,TValue>.Values | Gets an ICollection containing the values in the IDictionary. |
| System.Collections.ICollection.IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
| System.Collections.ICollection.SyncRoot | Gets an object that can be used to synchronize access to the ICollection. |
| System.Collections.IDictionary.IsFixedSize | Gets a value indicating whether the IDictionary has a fixed size. |
| System.Collections.IDictionary.IsReadOnly | Gets a value indicating whether the IDictionary is read-only. |
| System.Collections.IDictionary.Item | Gets or sets the element with the specified key. |
| System.Collections.IDictionary.Keys | Gets an ICollection containing the keys of the IDictionary. |
| System.Collections.IDictionary.Values | Gets an ICollection containing the values in the IDictionary. |