![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the Count property of BitArray class in C#?
Count the number of elements in the BitArray class using the Count property.
Let us first set our BitArray class −
BitArray arr = new BitArray(10);
Now use the Count property as shown below −
Example
using System; using System.Collections; public class Demo { public static void Main() { BitArray arr = new BitArray(10); Console.WriteLine( "Count: {0}", arr.Count ); } }
Output
Count: 10
Advertisements