O'Reilly logo

Microsoft® Visual C#® 2005 Step by Step by John Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Operator Overloading

After completing this chapter, you will be able to:

  • Implement binary operators for your own types.

  • Implement unary operators for your own types.

  • Write increment and decrement operators for your own types.

  • Understand the need to implement some operators as pairs.

  • Implement implicit conversion operators for your own types.

  • Implement explicit conversion operators for your own types.

You have made a great deal of use of the standard operator symbols (such as + and –) to perform standard operations (such as addition and subtraction) on types (such as int and double). Many of the built-in types come with their own predefined behaviors for each operator. You can also define operators for your own structs and classes, which is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required