Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax help 4

Status
Not open for further replies.

jshurst

Programmer
Oct 27, 2004
1,158
US
I'm more of a vb.net programmer, not much of a C# programmer (just learning). I'm currently beginning a project using IBM MQ for .net and one line of syntax has me a little confused. This is probably a really obvious question, but how do I convert this to vb.net?

Code:
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT ;

I don't know what the "pipe" translates to.

Thanks in advance.

J
 
Hi,

The pipe is an Or operator

Thanx!

Dave Shaw
Nothing is Impossible, it is just something I haven't got round to doing. - Me
History admires the wise, but elevates the brave. - Edmund Morris
 
That's what I thought, but for some reason I thought an "or" was two pipes ||

thanks a lot!
 
It's a bitwise-OR, versus the two-pipe version which is a logical-OR.

so, 2 | 1 returns 3 because the bit-patterns are:
[tt]
00000010
00000001
========
00000011
[/tt]

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Chip,

You are the man. I did not know or understand bitwise operations, but I found this very helpful article on Wikipedia that explained it. Hopefully, it will help anyone else who may be wondering and want to learn.


----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top