>>>Why add the shift bit op? Just use:
>>>(mybyte & 128) != 0
>>
>>Just because to show what we are doing. When dealing with bits I find it more 'not hard coded' if I use bitpostion instead:)
>
>FWIW I did not find Michael's solution obscure or hard coded at all, given that one understands hexadecimal. Which one should if one is going to bit twiddle....
Hmm maybe I'm having an English problem here:) I can easily see it's 1 << 7 or 128 or 0x80 ...
However if someone needs something like this, then it's likely next step would be creating an indexer for it. For the indexer I think it would be much reasonable to index by bit positions rather than final bitshifted value.
Cetin