System.Collections.Specialized.NameObjectCollectionBase.Count Property

Gets the number of key/value pairs contained in the System.Collections.Specialized.NameObjectCollectionBase instance.

Syntax

public virtual int Count { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The capacity is the number of elements that the System.Collections.Specialized.NameObjectCollectionBase can store. NameObjectCollectionBase.Count is the number of elements that are actually in the System.Collections.Specialized.NameObjectCollectionBase.

The capacity is always greater than or equal to NameObjectCollectionBase.Count. If NameObjectCollectionBase.Count exceeds the capacity while adding elements, the capacity is automatically increased by 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.

Requirements

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0