Binary operators with assignment
suggest changeC# has several operators that can be combined with an = sign to evaluate the result of the operator and then assign the result to the original variable.
Example:
x += y
has the same effect, for a variable, as
x = x + y
Assignment operators:
+=-=*=/=%=&=|=^=<<=>>=
For an event, += and -= add and remove a handler. They are not x = x + y.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents