BitVector32 in the real world

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/7/18/bitvector32-in-the-real-world.html
Published Friday, July 18, 2003 11:35 PM by RoyOsherove
Filed under:

Comments

Friday, July 18, 2003 12:58 PM by John R. Lewis

# re: BitVector32 in the real world

Chris did not write the article, he wrote a blog entry pointing to my article. :-)
Friday, July 18, 2003 1:15 PM by Roy Osherove

# re: BitVector32 in the real world

jeez! I'm so sorry, scrwed a little bit there. *fixed*
Friday, July 18, 2003 2:16 PM by Mattias Sjögren

# re: BitVector32 in the real world

FYI, the BitVector32 has a bug in that the indexer always returns false for bit #31, even if it's set. The following code should reproduce it.

class BitVectorBugDemo
{
static void Main()
{
BitVector32 bv = new BitVector32( unchecked((int)0xFFFFFFFF) );
int mask = BitVector32.CreateMask();

for ( int bit = 0; bit < 32; bit++ ) {
Console.WriteLine( "Bit: {0}, Mask: {1:X}, value: {2}", bit, mask, bv[mask] );
if ( bit < 31 ) mask = BitVector32.CreateMask( mask );
}
}
}
Friday, July 18, 2003 2:18 PM by Roy Osherove

# re: BitVector32 in the real world

Is this a known bug? as in MS is aware of this?
Friday, July 18, 2003 7:35 PM by TrackBack

# Matthew ".NET" Reynolds

Matthew ".NET" Reynolds
Friday, July 18, 2003 7:35 PM by TrackBack

# ISerializable

ISerializable
Friday, July 18, 2003 10:57 PM by Mattias Sjögren

# re: BitVector32 in the real world

Yes, it was reported to them during the Everett beta.
Monday, July 21, 2003 6:28 AM by Kit George

# re: BitVector32 in the real world

Just a note all: we are tracking this issue at Microsoft, and we do appreciate you taking the time to let us know about it. We didn't get a chance to fix this during Everett, but you can expect this to be fixed in the next release.

Thanks,
Kit
Monday, July 05, 2004 12:11 PM by william

# re: BitVector32 in the real world

bloddy buggy crap