Is there a generic (type-safe) BitArray in .NET?
问题 Is there a generic BitArray in .NET? I only found the non-generic one. Can there be a generic BitArray? (i.e. would it be reasonable?) Edit: Maybe I should have said type-safe not generic. Basically when you enumerate the type as object , should it not be int or bool ? Or one of them provided in another member enumerator? Example: foreach (bool bit in myBitArray) { } Edit: I just checked the enumerator of the BitArray class, but everything returns an object except .Current property: public