Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

!= in VB.NET

Is there are != type operator in VB.Net?

Thanks,
Kanan
0
1-WireWorld_net
Asked:
1-WireWorld_net
4 Solutions
 
gangwischCommented:
yes
a!=b would be a<>b there also is a= not b
0
 
laotzi2000Commented:
a <> b is all right
but a = not b is not right,
 should be not a = b
0
 
lordicarusCommented:
you could however use in certain cases

a Is Not b
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hismightinessCommented:
FYI - In case of any confusion, your correct answers are shared amongst those who have posted before me:

Correct Syntax:

if varA = varB then... (equals to... comparing variables)
if varA <> varB then...  (not equal - or - less than and greater than... comparing variables)

if varA Is varB then... (equals to... comparing objects)
if varA Is Not varB then... (not equal... comparing objects)
0
 
RobertRFreemanCommented:
You can also use the standard forms:
if not varA Is varB then...  (Object pointer comparison)
if not varA = varB then...  (Value comparison)
0
 
1-WireWorld_netAuthor Commented:
Thank you all for the comments.  I was hopeing there was something cleaner, but oh well.


Thanks again,

Kanan
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now