System.Collections.BitArray.Count Property

Gets the number of elements contained in the BitArray.

Syntax

public int Count { get; }

Value

A int that specifies the number of elements contained in the current instance.

Remarks

BitArray.Length and BitArray.Count return the same value. BitArray.Length can be set to a specific value, but BitArray.Count is read-only.

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

Requirements

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