Method

# Operator_MultiplyRight

<div class="rst-class">

forsearch

</div>

Operator

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

## Description

Used to overload the `*</api/language/operators/mathematical/x>` operator, providing custom functionality.

## Notes

Create an Operator_MultiplyRight function in a class to specify the functionality of the `*</api/language/operators/mathematical/x>` operator for that class.

In the function, the `Self</api/language/self_keyword>` instance is the operand on the right and the other operand is passed as a parameter.

The ordinary 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

Using the Vector class (see `Operator Add</api/language/operators/operator_overloads/operator_add>`) with two `Integer</api/data_types/integer>` elements, x and y, we define an Operator_MultiplyRight function that multiplies the sum of the passed instance with the `Self</api/language/self_keyword>` instance.

``` xojo
Function Operator_MultiplyRight(lhs As Vector) As Integer
  Var a, b As Integer
  a = Self.x + Self.y
  b = lhs.x + lhs.y

  Return b * a
End Function
```

## Compatibility

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

<div class="seealso">

`*</api/language/operators/mathematical/x>` operator; `Operator Multiply</api/language/operators/operator_overloads/operator_multiply>` function.

</div>
