Chapter 22. Operator overloading

After completing this chapter, you will be able to:

The examples throughout this book make 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 how operators should behave for your own structures and classes, which is the subject of this chapter.

Understanding operators

It is worth ...

Get Microsoft Visual C# 2013 Step by Step 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.