In-place binary assignment operator
There are a number operators and functions that combine assignment with some sort of binary operator.
Sometimes a value is returned before the assignment occurs. When there is an operator for this, the operator is a prefix operator and the function name starts with Pre
.
Sometimes the binary operation occurs first, and then the assignment occurs. When there is an operator for this, the operator is a postfix operator.
Infix operators combined with assignment end in By
, From
, or To
.
- AddTo — add a value and update; return the updated value
- Decrement — decreases a value by one and assign the value; return the original value
- DivideBy — divide by a value and update; return the new value
- Increment — increases the value by one and update; return the original value
- PreDecrement — decrease the value by one and update; return the new value
- PreIncrement — increase the value by one and updage; return the new value
- SubtractFrom — subtract a value and update; return the new value
- TimesBy — multiply a value and update; return the new value