Character type char , which stores a character enclosed in "(single quote)
String Type a string that stores a string of characters enclosed in "" (double quotation marks),
Integer type int , which stores integers
Double-precision floating-point double , storing decimals
logical operators are used to concatenate multiple bool type expressions to achieve compound judgments of multiple conditions. logical operators in C # include: logical non (!), logical AND (&&), logical, or (| |).
Operator Precedence for C #
① brackets . The C # language is the same, if you have multiple brackets, you have to calculate from the inside out. Parentheses have the highest precedence.
② a unary operator . Some operators have 2 operands on either side, such as 2+3, 6%5, and so on, which are called two-dollar operators . Only one operand is called a unary operator , and their precedence is higher than the two-dollar operator. Unary operators include:+ + (self-added),-(self-subtraction),! (logical).
③* (multiply),/(except),% (take the remainder).
④+ (plus),-(minus).
⑤> (greater than), < (less than), >= (greater than or equal), <= (less than or equal).
⑥= = (equals),! = (not equal to).
⑦&& (logic and).
⑧| | (logical OR).
The ⑨ assignment operator . Includes: =, + =,-=, *=,/=,%=.
Also, it is important to note that operators with the same precedence are evaluated from left to right (the assignment operator is reversed).
Basic knowledge of C #