System.Collections.Generic.SortedList<TKey,TValue>.Count Property

Gets the number of key/value pairs contained in the SortedList`2.


public int Count { get; }


Documentation for this section has not yet been entered.


SortedList`2.Capacity is the number of elements that the SortedList`2 can store. SortedList`2.Count is the number of elements that are actually in the SortedList`2.

SortedList`2.Capacity is always greater than or equal to SortedList`2.Count. If SortedList`2.Count exceeds SortedList`2.Capacity while adding elements, the capacity is increased by automatically reallocating the internal array before copying the old elements and adding the new elements.

Retrieving the value of this property is an O(1) operation.


Namespace: System.Collections.Generic
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0