Operator Precedence


Table 4-2 shows the order of precedence for all C# operators, from highest to lowest. This table includes several operators that will be discussed later in this book.

Table 4-2: The Precedence of the C# Operators

Highest

          

()

[]

·

++ (postfix)

−− (postfix)

checked

new

sizeof

typeof

unchecked

!

~

(cast)

+ (unary)

(unary)

++ (prefix)

−− (prefix)

       

*

/

%

           

+

              

«

»

            

<

>

<=

>=

is

as

       

==

!=

              

&

            

^

          

|

            

&&

                

||

                

?:

                

=

op=

            

Lowest

                




C# 2.0(c) The Complete Reference
C# 2.0: The Complete Reference (Complete Reference Series)
ISBN: 0072262095
EAN: 2147483647
Year: 2006
Pages: 300

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net