C# BitArray Length
Description
BitArray Length
gets or sets the number of elements in
the BitArray.
Syntax
BitArray.Length
has the following syntax.
public int Length { get; set; }
Example
/*w ww . j a va2 s. com*/
using System;
using System.Collections;
public class SamplesBitArray {
public static void Main() {
BitArray myBA = new BitArray( new byte[]{0,0,0,1} );
Console.WriteLine(myBA.Length);
}
}
The code above generates the following result.