Chapter 10 Operator overloading
159
What is operator overloading? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
What types need overloaded operators? . . . . . . . . . . . . . . . . . . . . .160
What can you overload? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
Rules of overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Overloading operators in managed types . . . . . . . . . . . . . . . . . . . . . . . . . .161
Overloading arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Using static operator overloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
Do'stlaringiz bilan baham: |