Operator XOrRight

From Xojo Documentation

Method

Used to overload the XOr operator, providing custom functionality.

Notes

Create an Operator_XOrRight function in a class to specify the functionality of the XOr operator for that class. Operator_XOrRight assumes that the Self instance of the class is on the right and the passed instance is on the left.

In the function, the Self instance the right operand and the other operand is passed as a parameter.

The ordinary (left) methods are always preferred; the Right version is used only if there is no legal left version.

Sample Code

Suppose you define a class myResult with the property a as Boolean. Operator_XOrRight is defined as:

Function Operator_XOrRight(lhs As MyResult) As Boolean
Return lhs.a Xor Self.a
End Function

See Also

XOr operator, Operator_XOr function.