O'Reilly logo

C# Primer Plus by Klaus Michelsen

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

Combining Different Types in One Expression

Recall that even the most complicated expressions involving binary operators can be divided into sub-expressions, each consisting of two operands and an operator; and remember how operator precedence and associativity rules determine to which operand each operator is applied. Along with the values passed through the various levels of this sub-expression hierarchy are also the types of these values, as illustrated in Figure 7.3.

Figure 7.3. Types from sub-expressions transferred through expression hierarchy.

Consequently, if we can somehow determine the type of any expression involving just two operands ...

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