Exclusive or in visual basic.

n1849778
n1849778 used Ask the Experts™
on
Hi,

  Does anyone knows how to do exclusive and inclusive or in visual basic. Thanks in advanc.

Rabi
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
for exclusive or use Xor operator
for inclusive or use or operator

eg;

Dim a As Integer
Dim b As Integer
Dim a1 As Integer
a = 4
b = 5
a1 = a Or b
Debug.Print a1
a1 = a Xor b
Debug.Print a1

Commented:
If you're using Vb.Net, you'll have to use some new commands:

BitOr

BitXor

Author of the Year 2009

Commented:
Hi n1849778,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept appari's comment(s) as an answer.

n1849778, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.
==========
DanRollins -- EE database cleanup volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial