Operator
1. Arithmetic operators
assignment operator
c#
An expression that is connected by an equal sign, called an assignment expression. We require that the data types on both sides of the equal sign must be one .
2. Arithmetic operators
)
)
++
, whether it's pre-Gaga or post-Gaga.
to itself
- -
, whether it's a pre-or post-decrement.
3. use of the plus sign
1. connection, when the plus sign on either side is a string, at this time, the function of the plus is to connect
2. Add, when the plus sign is on both sides of the number, the plus sign is the function of adding.
4. Compound assignment operator
+= -= *= /= %=
Example number = number-10;
Number = ten;
5. Relational operators
An expression that is connected by a relational operator is called a relational expression.
> , , >= , <= , Span style= "Font-family:times New Roman;" >== !=
Each expression is able to solve a fixed value.
6. Logical Operators
Logic and &&
logical OR
logical non-
Note: bool The value of type
logic and precedence are higher than logical OR.
C # Operators