And What of the += and –+ Operators?
If you are coming to C# from a C++ background, you may lament the loss of overloading the
shorthand assignment operators (+=, -=, and so forth). Fear not. In terms of C#, the shorthand
assignment operators are automatically simulated if a type overloads the related binary operator.
Thus, given that the Point structure has already overloaded the + and - operators, you are able to
write the following:
Do'stlaringiz bilan baham: