Binary operators with assignment

suggest change

C# 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents