Bit-wise And

  • Thread starter Thread starter Chuck Cobb
  • Start date Start date
C

Chuck Cobb

Can someone tell me how to do a bit-wise "And" in VB.Net - I've looked all
over and can't find it. I thought the "And" in VB6 was replaced by a
"BitAnd" function, but I can't find it anywhere and when I try to use it, it
is unrecognized. Is it part of a class somewhere?

Thanks,

Chuck Cobb
 
Chuck Cobb said:
Can someone tell me how to do a bit-wise "And" in VB.Net - I've looked all
over and can't find it. I thought the "And" in VB6 was replaced by a
"BitAnd" function, but I can't find it anywhere and when I try to use it, it
is unrecognized. Is it part of a class somewhere?

Thanks,

Chuck Cobb

To make a long story short, the explicit bit-wise operators got pulled
before the final release.
They were in there in an early beta but got converted back to the old VB
style operators.
Presumably, it was due to complaints and/or perceived complaints from VB6
converts.
Using BitAnd / BitOr would have broken code and confused people, so the
normal AND is both logical and bitwise, just like VB6.
Seems it is OK to overhaul just about everything else, go through the
trouble to actually make something more logical, then wreck it out and make
it work the old way.

Gerald
 
Thanks - That cleared up the mystery of this!

You're right - it would have been cleaner to separate the logical form of
"And" and the Bit-Wise form of "And".

What makes it even more confusing is that there are still references to the
"BitAnd" function on the web and no mention of the decision to pull them
prior to release.

Chuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top