Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does the <> operator mean in VB.net

Tags:

vb.net

I'm looking at some legacy code that says

If OBRString <> "^^" then

What does the <> operator mean?

like image 202
bernie2436 Avatar asked Mar 19 '12 14:03

bernie2436


People also ask

What are the operators in Visual Basic?

Operators and Expressions in Visual Basic An operator is a code element that performs an operation on one or more code elements that hold values. Value elements include variables, constants, literals, properties, returns from Function and Operator procedures, and expressions.

What is not equal in VB?

It is a logical function, so the output returned by this function is either “True” or “False.” We know that the equal operator is “=” this but not equal is “<>” in VBA, so whatever the value we get from the equal operator, we will get the exact opposite value using the Not Equal operator.

What is the meaning of -=?

The -= operator first subtracts the value of the expression (on the right-hand side of the operator) from the value of the variable or property (on the left-hand side of the operator). The operator then assigns the result of that operation to the variable or property.


2 Answers

It means "does not equal".

Equivalent c# operator is !=

See Comparison Operators (Visual Basic)

like image 94
LarsTech Avatar answered Nov 02 '22 20:11

LarsTech


It checks for inequality, so here it checks whether OBRString is not equal to "^^".

like image 45
Ahmad Mageed Avatar answered Nov 02 '22 20:11

Ahmad Mageed