1. Relational operator:< less than, <= small equals, > Greater than, >= large equals, = = equals,! = is not equal.
2. Logical operators:! Logical non, && logic and (two All), | | Logical OR (one of the two matches).
3. Conditional operator: expression 1? Expression 2: Expression 3, expression 1 bit true is return expression 2, otherwise return expression 3. max = A>b? A:B;
4.is operator: Used to check whether the expression is of the specified type, and if so, returns True, otherwise false.
5.+ 、-、 *,/,% corresponds to subtraction per cent.
6. Bitwise operator: The left shift operator (<<) moves the first operand to the left by the number of bits specified by the second operand, the vacated position is 0, and the left shift is equivalent to multiplication. The left shift is equivalent to multiply by 2, the left two is equal to 4, and the left three is the equivalent of multiply by 8. The type of the second operand must be an int or a type that has a predefined implicit numeric conversion to int. 1<<3 = 8. Shift Right (>>) moves the first operand to the right by the number of bits specified by the second operand, and the vacated position is 0. The right shift is equivalent to divide. Shift right one is equivalent to dividing by 2, the right shift two is equivalent to dividing by 4, and the right shift three bits is equivalent to dividing by 8. 16>>4 = 1.
7. Merge operator: If the left operand of this operator is not NULL, this operator returns the left operand, otherwise the right operand is returned.
int x = NULL;
Set y to the value of X if x are not null; otherwise
If x = null, set y to-1.
int y = x?? -1;
8.^ operator: For integer, ^ calculates the bitwise XOR of the operand. for bool operands, ^ calculates the logical "XOR" of the operand, which means that the result is true if and only if only one operand is true. True ^ false = True,false ^ false = False.
The 9.~ operator performs a bitwise complement operation on the operand, which is equivalent to reversing each bit. The bitwise complement operator is predefined for int, uint, long, and ulong types.
C # Operators