public Int32 NextClearBit(Int32 from) {
if (from < 0) {
throw new IndexOutOfRangeException("'from' index cannot be less than zero.");
}
this.CheckInvariants();
Int32 offset = WordIndex(from);
if (offset >= this._wordsInUse) {
return from;
}
Int32 result = -1;
long w = ~this._bits[offset] & (LONG_MASK << from);
while (true) {
if (w != 0) {
result = (offset * BITS_PER_WORD) + NumberOfTrailingZeros(w);
break;
}
if (++offset == this._wordsInUse) {
result = this._wordsInUse * BITS_PER_WORD;
break;
}
w = ~this._bits[offset];
}
return result;
}