
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Length Property of BitArray Class in C#
The length property is used to gets or sets the number of elements in the BitArray.
Our BitArray.
BitArray arr = new BitArray( 5 );
To calculate the length, use the length property.
Console.WriteLine( "Length: {0}", arr.Length );
You can try to run the following code to learn how to work with Length property of BitArray class.
Example
using System; using System.Collections; public class Demo { public static void Main() { BitArray arr = new BitArray( 5 ); Console.WriteLine( "Count: {0}", arr.Count ); Console.WriteLine( "Length: {0}", arr.Length ); } }
Output
Count: 5 Length: 5
Advertisements