Method

# Operator_Not

<div class="rst-class">

forsearch

</div>

Operator

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

## Description

Used to overload the `Not</api/language/operators/bitwise_logical/not>` operator, providing custom functionality.

## Notes

Create an <span class="title-ref">Operator_Not</span> function in a class to specify the functionality of the `Not</api/language/operators/bitwise_logical/not>` operator for that class. Whenever you use the `Not</api/language/operators/bitwise_logical/not>` operator in your code to operate on two instances of the class, your <span class="title-ref">Operator_Not</span> function will be called.

In the function, the `Self</api/language/self_keyword>` instance is the only operand. No parameters are passed.

<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_Not</span> is defined on the class as:

``` xojo
Function Operator_Not As Boolean
  Return Not Self.a
End Function
```

## Compatibility

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

<div class="seealso">

`Not</api/language/operators/bitwise_logical/not>` operator.

</div>
