System.Collections.Generic.SortedList

Added in .NET 2.0
implements an ordered list
items are sorted by key as they are added
Identical to SortedDictionary but it is optimised for fast insertion of previously sorted data.


This represents a collection of keys/pairs that are sorted by the keys and are accessible by key and by index.
As elements are added the capacity is automatically increased as required.
The capacity can be reduced by calling TrimToSize or by explicitley settings the Capacity property


System.Collections.Generic.SortedList 

objSortedList.Count 
objSortedList.Capacity
objSortedList.GetByIndex
objSortedList.GetKey

Methods

Add 
Clear 
ContainsKey 
ContainsValue 
IndexOfKey 
IndexOfValue 
Remove 
RemoveAt 
TrimExcess 
TryGetValue 

Non Generic

This class is not to be confused with the Non Generic SortedList Class introduced in .NET 1.1


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext