lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 20
The precedence and associativity of the operators cannot be controlled.
A. True
B. False
Operator precedence
When an expression contains multiple operators, the precedence of the operators controls the order in which the individual operators are evaluated. The following list summarizes all operators in order of precedence from highest to lowest: 1:(* / %) 2:(+ -) 3:(< > <= =>) 4:(== !=) 5:(&) 6:(^) 7:(|) 8:(&&) 9:(||) 10:(??) 11:(?:)
Operator associativity
Operators with the same precedence are evaluated based on associativity. Left-associative operators are evaluated in order from left to right. Right-associative operators are evaluated in order from right to left.
Links:
C# Operators