Abstract
C# adopted the capability of operator overloading from C++. Just as you can overload methods, you can overload operators such as +, -, *, and so on. In addition to overloading arithmetic operators, you can also create custom conversion operators to convert from one type to another. You can overload other operators to allow objects to be used in Boolean test expressions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Trey Nash
About this chapter
Cite this chapter
Nash, T. (2010). Overloading Operators. In: Accelerated C# 2010. Apress. https://doi.org/10.1007/978-1-4302-2538-6_6
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2538-6_6
Publisher Name: Apress
Print ISBN: 978-1-4302-2537-9
Online ISBN: 978-1-4302-2538-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)