Appendix A. Operator Overloading
In this appendix: |
Developers add operator overloading to user-defined types to describe how that type works with common operators. A feature of built-in types is the automatic support of most operators. Built-in types, such as int, float, and long-value types, behave intuitively with mathematical, logical, and conditional operators. As expected, the plus, minus, and multiply operators implicitly perform addition, subtraction, and multiplication when applied to these types. This intrinsic knowledge of operators makes using built-in types convenient. You might want to use user-defined types as conveniently. Unfortunately, ...
Get Programming Microsoft® Visual C#® 2005: The Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.