using System;
using System.Collections;
class MainClass {
public static void Main() {
BitArray ba = new BitArray(8);
byte[] b = { 67 };
BitArray ba2 = new BitArray(b);
Console.WriteLine("Original contents of ba:");
for(int i=0; i < ba.Count; i++)
Console.Write("{0, -6} ", ba[i]);
ba = ba.Not();
Console.WriteLine("Contents of ba after Not:");
for(int i=0; i < ba.Count; i++)
Console.Write("{0, -6} ", ba[i]);
}
}
|