I'm looking at some legacy code that says
If OBRString <> "^^" then
What does the <>
operator mean?
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.
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.
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.
It means "does not equal".
Equivalent c# operator is !=
See Comparison Operators (Visual Basic)
It checks for inequality, so here it checks whether OBRString
is not equal to "^^"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With