Name

SortedList

Synopsis

This class is a dictionary collection in which values can be retrieved by either associated key or by index (meaning that the elements are specifically ordered). Keys are sorted based on their object type (e.g., strings are alphabetically sorted). You can override the default key comparison methods by providing your own IComparer-implementing object to the SortedList constructor.

Many methods are defined to allow you to retrieve values by either key name or index value. The IndexOfKey() and IndexOfValue() methods return the zero-based index value of the specified key or value. GetByIndex() and SetByIndex() use the index values for their functionality.

Public Class SortedList : Implements IDictionary, ICollection, IEnumerable, ICloneable
' Public Constructors
   Public Sub New() 
   Public Sub New( ByVal comparer As IComparer) 
   Public Sub New(ByVal comparer As IComparer, 
        ByVal capacity As Integer) 
   Public Sub New( ByVal d As IDictionary) 
   Public Sub New(ByVal d As IDictionary, 
        ByVal comparer As IComparer) 
   Public Sub New( ByVal initialCapacity As Integer) 
' Public Instance Properties
   Overridable Public Property Capacity As Integer  
   Overridable Public ReadOnly Property Count As Integer Implements ICollection.Count 
   Overridable Public ReadOnly Property IsFixedSize As Boolean Implements IDictionary.IsFixedSize 
   Overridable Public ReadOnly Property IsReadOnly As Boolean Implements IDictionary.IsReadOnly 
   Overridable Public ReadOnly Property IsSynchronized As Boolean Implements ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.