BitArray alternative for the .NET Micro Framework
问题 Is there a BitArray alternative for the .NET Micro Framework? I was thinking about simply using a bool[], but how can you convert it back into a byte[] ? In the full framework, considering "bits" is a BitArray, the following works: byte[] data = new byte[dimensions / 8]; bits.CopyTo(data, 0); But I cannot seem to find the BitArray class in the micro framework 回答1: It's not terribly difficult to duplicate the functionality of BitArray . First, if you need fewer than 65 bits, then you can do it