O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

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

Summary

This chapter explained precedence, operators, and operator overloading.

In an expression, a program uses precedence rules to determine the order in which operations are evaluated. For example, * has a higher precedence than + and , so the expression 1 + 2 * 3 - 4 equals 3 rather than 5, -3, or some other value.

The operator tables in this chapter summarized the most common operators available in C# and Visual Basic and listed them in order of precedence. By using those tables, you can determine exactly how any expression will be evaluated by a program.

You can use parentheses to change an expression’s evaluation order and make the program perform operations in a different order than the one dictated by the precedence rules. You also can ...

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