Michael,
"better" is a subjective term, at best. If you were to ask the OP, I
would say that using a BitArray is better, since it gives him the exact
functionality he is looking for.
Also, "potentially" inefficient doesn't hold much meaning. It probably
is slower than just applying a bit mask, but to be honest, I don't know how
much slower it can be and depending on what you are doing, how significant
that performance hit will be.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>> You can use the BitArray class, passing in the integer, like so:
>>
[quoted text clipped - 7 lines]
>
> Michael
Michael C - 16 Oct 2007 02:05 GMT
> Michael,
>
[quoted text clipped - 6 lines]
> how much slower it can be and depending on what you are doing, how
> significant that performance hit will be.
That is why I used the terms "potentially", "I guess" and "possibly".
Naturally it depends on the situation but it is wise to mention that your
solution is potentially inefficient. If used in a loop the BitConverter
could possibly be 50 to 100 times slower. (No I have not tested this and it
is a guesstimate).
Michael