How is removing dead code NOT a stability enhancement?
Guest last edited by
They don't want to delete three evil lines of code "this late" in Whidbey.
paranoidgeek last edited by
The whole things is a bit of a WTF.
This is a better way :
private DataRowState ConvertToRowState(BitArray bitStates, int bitIndex)In fact why do they do it that way ...?
bool flag2 = bitStates[bitIndex];
bool flag1 = bitStates[bitIndex + 1];
if (flag2 && flag1)
} // end of function
I tend to use a defined 1 for the first bit 2 for the next then 4,8,16,32, etc.
Then bit-and or bit-or to get the values in and out.
I guess that whole "throw Exceptio..." thing it a bit helpfull should anybody ever change the code ......
too_many_usernames last edited by
I realize this is a very old post, but wow is that freakish code.
Having an if() block for this type of thing is tragic. Looks like they're just pulling out bits and should've used an enum or something similar.
Multiple exit points from a function are also no-nos and should actually be shunned more than goto....
And wow, that has got to be a terrible way to implement a bit array....sometimes I think people shouldn't be allowed to use OOP unless they know how to do things without it.