SortedList mySortedList = new SortedList(); mySortedList.Add("John", "Doe"); mySortedList.Add("Jane", "Smith"); mySortedList.Add("Jim", "Brown");
mySortedList.Remove("Jim");
string value = (string)mySortedList["John"];In conclusion, System.Collections SortedList is a type of collection class which provides a sorting functionality to your data. SortedList can be used when you require a collection of key-value pairs that are sorted by the keys. The package library that includes the SortedList class is System.Collections.