I expected to find a existing question here on SO about this but i didn't.
What is the advantage of using a Bitarray
when you can store your bool
values in a bool[]
?
System.Collections.BitArray biArray = new System.Collections.BitArray(8);
biArray[4] = true;
bool[] boArray = new bool[8];
boArray[4] = true;
The bool[]
seems a little more handy to me because there exist more (extension)methods to work with a array instead of a BitArray