Operator And

From Xojo Documentation

Method

Used to overload the And function, providing custom functionality.

Notes

Create an Operator_And function in a class to specify the functionality of the And operator for that class. Whenever you use the And operator in your code to operate on two instances of the class, your Operator_And function will be called.

In the function, the Self instance is one of the operands and the other operand is passed as a parameter. Self is assumed to be on the left.

Sample Code

Suppose you define a class MyResult with the property a as Boolean. Operator_And is defined as:

Function Operator_And(rhs As MyResult) As Boolean
Return Self.a And rhs.a
End Function

See Also

And operator, Operator_AndRight function.