Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4565650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:40:26+00:00 2026-05-21T18:40:26+00:00

After struggling to make the .NET BitArray class work for my needs, I decided

  • 0

After struggling to make the .NET BitArray class work for my needs, I decided to look for a more robust open-source or commerical one on the web. To my surprise, I can’t find a single one. I see various suggestions for extension methods or ways to work around limits to BitArray functionality, but nothing resembling a BitArray replacement.

Are we all reinventing the wheel by extending or replacing BitArray?

Ideally, a replacement would have some/all of these features:

  1. Implements IList<bool> rather than just ICollection.

  2. Can cast to various other types such as int (for up to 32-bit BitArrays), bool (for one-bit BitArrays), double, etc.

  3. Implements a ToArray type of method that yields a byte array. It may be parameterized for endianness. Since BitArray can be constructed from a byte array parameter in the constructor, it seems like good closure to be able to return it to a byte array.

  4. Ability to extract sub-BitArrays from it. For example, from an array like 111101, you could extract bits 1 to 4, yielding a new BitArray of 1110.

  5. Bit shifting operators.

  6. Handles indefinite lengths of bits (like BitArray does), but can still cast to limited types like int, just like you can cast a long to an int if you know it will fit.

  7. ?__ I bet there are plenty of other items on people’s wish lists.

Do you know of any open-source or commercial implementations out there? If it’s open source, it would be nice to have a nonreciprocal license such as Apache, MIT, or Ms-Pl.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:40:27+00:00Added an answer on May 21, 2026 at 6:40 pm

    Perhaps you are looking for BigInteger in the System.Numerics namespace? It certainly looks like it can do whatever you are asking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been struggling all morning to try and work out how mod_rewrite works after
I am struggling to make a SqlCE local database to work in my winforms
I'm struggling to make this script work. What I'm looking to achieve is to
OK so after struggling for a while trying to get cURL to fetch a
After some struggling I managed to get boost smart pointers to build for Windows
After a week of struggling I just got the msdeploy handler up on IIS7
I'm trying (or rather struggling) to create a little Blackjack game. After some JavaScript
I'm really struggling to make facebook connection working for my system. What I want
I'm a bit struggling with the @font-face CSS option. After a lot of reading,
I'm currently struggling to understand how I should organize/structure a class which I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.