public static void AndNot(this BitArray bitsA, BitArray bitsB)
{
//Debug.Assert(bitsA.Length == bitsB.Length, "BitArray lengths are not the same");
for (int i = 0; i < bitsA.Length; i++)
{
//bitsA was longer than bitsB
if (i >= bitsB.Length)
{
return;
}
if (bitsA[i] && bitsB[i])
{
bitsA[i] = false;
}
}
}