I tried this code and it did not do what I expected.
byte byt = byte.MaxValue; BitArray bitArray = new BitArray(byt); Debug.WriteLine("bitarray " + bitArray.Get(0).ToString()); Debug.WriteLine("bitarray " + bitArray.Get(5).ToString());
What I expected was the opposite of what I got, which was the following.
byte byt = byte.MaxValue would set the byte to 255, which I believe is all bits set.
I got the same results with
byte byt = byte.MinValue So what exactly do these initializes do?
Thanks for reading.