Confused with conditional and logical operators - VB.net
Posted
by
AgentRev
on Stack Overflow
See other posts from Stack Overflow
or by AgentRev
Published on 2011-09-13T19:46:15Z
Indexed on
2012/09/14
15:38 UTC
Read the original article
Hit count: 281
I'm kind of new to VB.net, and since I just finished a C# course, the lack of parentheses creates a lot of confusion on how to write certain combinations of operators.
The C# equivalent of the line I am trying to reproduce in VB would be like this :
if ( (a == 0 && b != null) || (a == 1 && c != null) )
I'm have no idea how to write this in VB, I've tried many combinations of And, Or, AndAlso, OrElse, etc. but I can't achieve the desired result.
I can't find any clear example of C# v.s. VB.net comparison on operators, and the notes I have aren't helpful either.
Can someone help me figure this out?
© Stack Overflow or respective owner