This documentation is archived and is not being maintained.

SortedList.Keys Property

Gets the keys in the SortedList.

[Visual Basic]
Public Overridable ReadOnly Property Keys As ICollection  _
   Implements IDictionary.Keys
public virtual ICollection Keys {get;}
public: __property virtual ICollection* get_Keys();
public function get Keys() : ICollection;

Property Value

An ICollection containing the keys in the SortedList.




The ICollection is a read-only view of the keys of the SortedList. Modifications made to the underlying SortedList are immediately reflected in the ICollection.

The elements of the ICollection are sorted in the same order as the keys of the SortedList.

Similar to GetKeyList, but returns an ICollection instead of an IList.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SortedList Class | SortedList Members | System.Collections Namespace | ICollection | Values | GetKeyList | Performing Culture-Insensitive String Operations in Collections