Method

# Operator_AndRight

<div class="rst-class">

forsearch

</div>

Operator

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to overload the `And</api/language/operators/bitwise_logical/and>` function, providing custom functionality.

## Notes

Create an <span class="title-ref">Operator_AndRight</span> function in a class to specify the functionality of the `And</api/language/operators/bitwise_logical/and>` operator for that class. <span class="title-ref">Operator_AndRight</span> is the same as `Operator And</api/language/operators/operator_overloads/operator_and>` except that the `Self</api/language/self_keyword>` instance is on the right.

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

<div class="important">

<div class="title">

Important

</div>

This is not currently supported for Android.

</div>

## Sample code

Suppose you define a class MyResult with the property a as `Boolean</api/data_types/boolean>`. <span class="title-ref">Operator_AndRight</span> is defined as:

``` xojo
Function Operator_AndRight(lhs As MyResult) As Boolean
  Return lhs.a And Self.a
End Function
```

## Compatibility

|                       |                               |
|-----------------------|-------------------------------|
| **Project Types**     | Console, Desktop, Mobile, Web |
| **Operating Systems** | iOS, Linux, macOS, Windows    |

<div class="seealso">

`And</api/language/operators/bitwise_logical/and>` operator, `Operator And</api/language/operators/operator_overloads/operator_and>` function.

</div>
