clear() public method

Clears all bits (sets to false).
public clear ( ) : void
return void
 /// <summary>
 /// Copies the bits from the input to the result BitArray in reverse order.
 /// SF: Not sure how this is different than BitArray.Reverse();
 /// </summary>
 /// <param name="input">Input.</param>
 /// <param name="result">Result.</param>
 private static void Mirror(BitArray input, ref BitArray result)
 {
     result.clear();
     int size = input.Size;
     for (int i = 0; i < size; i++)
     {
         result[size - 1 - i] = input[i];
     }
 }
Ejemplo n.º 2
0
        public void testClear()
        {
            BitArray array = new BitArray(32);

            for (int i = 0; i < 32; i++)
            {
                array[i] = true;
            }
            array.clear();
            for (int i = 0; i < 32; i++)
            {
                Assert.IsFalse(array[i]);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Copies the bits from the input to the result BitArray in reverse order.
 /// </summary>
 /// <param name="input">Input.</param>
 /// <param name="result">Result.</param>
 internal static BitArray mirror(BitArray input, BitArray result)
 {
    result.clear();
    int size = input.Size;
    for (int i = 0; i < size; i++)
    {
       result[size - 1 - i] = input[i];
    }
    return result;
 }