From learn.microsoft.com:
The assignment operator (=) stores the value of its right-hand operand
in the storage location, property, or indexer denoted by its left-hand
operand and returns the value as its result. The operands must be of
the same type (or the right-hand operand must be implicitly
convertible to the type of the left-hand operand).
The simple assignment operator "=" is used to store the value of its right-hand operand into the memory location denoted by the left-hand operand. The result is its return value.
So, your operation will do: income= (income + i)
then (income)=(income)
, perfetly valid.
If you have problems with understanding income= (income + i)
, well, operator "+" has a return type, so see it like this int j= (int j+int i) where (int j+int i) has a return type int
This also works on primitive types, if you will try to do it with a user defined class you will have to overload the operator "+"
See
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/
for info about operators in c#