Assignment Operators |
For example : a = 3; where the equal sign is the assignment operator, so that no longer equals the mathematical sense, the equation 3 indicates the assigned variable assign the right to the left of the operator a.
Assignment expression : the assignment by the symbol "=" formula call on the connection assignment expression. For example: i = i + 3;
Note : variables can be reassigned to a variable once assigned a new value, the old value of the variable is ceased to exist.
E.g:
i=1;
i=7;
Console.WriteLine (i);
Console.ReadKey();
In this case the output value of 7 i; i is because the re-assignment.
Character translation |
With \ a plus sign, composed character translation, generally used for special characters
Arithmetic operators and compound assignment operators |
Arithmetic expression: equation connected by arithmetic operators, such as: 1 + 1, ab (variables a, b front and declared initial value)
++ plus one from front and rear plus plus, for example: I +, I +
-, decrement a front and a rear Save Save, e.g., --i, i-
front and back plus the difference added:
expressed in a wherein, the first placed in front of a subtraction operation performed, the remaining operation is performed
in an expression, placed behind the first remainder calculation performed, a subtraction operation is performed
binary operators: we require two operations the number can for computing, these operators, we called binary operators, such as: -, +, *,%, =
unary operators: operators only one operand can be called a unary operation, e.g. : num ++;
unary higher priority than a binary
Relational Operators |
Greater than> Less than <
== (equal to, equal) ,! = (Unequal)
is greater than or equal to> = Less than or equal <=, can not write to separate
In the computer, we use Boolean (bool) to represent the type of right or wrong sentence
The result of a relational operation is a boolean
Boolean (bool) Type:
BOOL values are two:
true: true
false: false
Logical Operators |
Normally both sides are logical operators relational expression
Logic
1. If the expression 1 and expression 2 a is false, then the whole expression is to false
2. If the results of the two expressions are true, then the whole expression is true
logic or
1. If the expression 1 or expression 2 as a result of true, then the whole expression is to true
2. If the result of the two expressions are false, then the final result is false
logic NOT
1. If the expression is true , then the inverse of expression is wrong
2. If the expression is false, then the negated is right