NextSetBit() публичный Метод

Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.
public NextSetBit ( long index ) : long
index long
Результат long
Пример #1
0
 internal virtual void DoNextSetBit(BitArray a, LongBitSet b)
 {
     int aa = -1;
     long bb = -1;
     do
     {
         aa = a.NextSetBit(aa + 1);
         bb = bb < b.Length() - 1 ? b.NextSetBit(bb + 1) : -1;
         Assert.AreEqual(aa, bb);
     } while (aa >= 0);
 }
Пример #2
0
        internal virtual void DoNextSetBit(BitArray a, LongBitSet b)
        {
            int  aa = -1;
            long bb = -1;

            do
            {
                aa = a.NextSetBit(aa + 1);
                bb = bb < b.Length() - 1 ? b.NextSetBit(bb + 1) : -1;
                Assert.AreEqual(aa, bb);
            } while (aa >= 0);
        }