Operators and Expressions
The C# expression syntax is very similar to the C/C++ expression syntax.
When an expression contains multiple operators, the precedence of the operators controls the order in which the elements of the expression are evaluated. The default precedence can be changed by grouping elements with parentheses.
int value1 = 1 + 2 * 3; // 1 + (2 * 3) = 7int value2 = (1 + 2) * 3; // (1 + 2) * 3 = 9
In C#, all binary operators are left-associative, which means that operations are performed left to right, except for the assignment and conditional (?:) operators, which are performed right ...