SortedList

Description

The SortedList class implements an object that is a collection of the Key-Value pairs sorted by the key value.

Comment

The collection is sorted automatically when new elements are added. Elements are sorted in ascending order of key value. Working with element is possible by key and also by index: to get or change element value by key, use the IDictionary.Item property; to access element by index, use the ISortedList.GetByIndex method, to change element value by index, use the ISortedList.SetByIndex method.

Class object properties inherited from IDictionary

  Property name Brief description
Item The Item property determines value of glossary element.
Keys The Keys property returns an object that contains the collection of glossary keys.
Values The Values property returns the object that contains the collection of the values of the glossary elements.

Class object properties inherited from ICollection

  Property name Brief description
Count The Count property returns the number of array elements.

Class object methods inherited from ISortedList

  Method name Brief description
Clone The Clone method creates a copy of the array.
ContainsKey The ContainsKey method checks the element by the key.
ContainsValue TheContainsValue method checks the element by the value.
GetByIndex The GetByIndex method returns element value by index.
GetKey The GetKey method returns element key by index.
GetKeyList The GetKeyList method returns an object that contains a list of array keys.
GetValueList The GetValueList method returns an object that contains a list of array values.
IndexOfKey The IndexOfKey method returns element index by key.
IndexOfValue The IndexOfValue method returns element index by value.
RemoveAt The RemoveAt method removes element by the index.
SetByIndex The SetByIndex method changes element value by index.

Class object methods inherited from IDictionary

  Method name Brief description
Add The Add method adds an element to glossary.
Clear The Clear method clears the glossary.
Contains The Contains method checks if the element with the Key key exists.
Remove The Remove method removes element with the Key key.

Class object methods inherited from ICollection

  Method name Brief description
CopyTo The CopyTo method copies the collection into an array.

See also:

Collections Assembly Classes