One, join operators
The concatenation operation is to concatenate two expressions together, with the operator "&" and "+", and if the operand is of type "String", then the two operators perform the same function, as shown in the following table:
Operator |
Name |
Type |
Description |
+ |
Plus connectors |
Binocular operator |
If the two operands are "string", the two operands are concatenated into a string, otherwise the plus sign is processed |
& |
Connection character |
Binocular operator |
To force the operand to "String" and then connect the operation |
Two, logical operators
Logical operators are often used to represent complex relationships. For example, if x is greater than or equal to zero, the square root of x is taken, which can be expressed in vb.net as:
If x>0 OR x=0 Then
X=MATH.SQRT (X)
End If
The logical operators are shown in the following table:
Operator |
Name |
Type |
Description |
and |
And |
Binocular operator |
A and B means "true" when both A and b,a and B are "true", otherwise "False" |
Not |
Non - |
Monocular operator |
Not a indicates that the a,a is 1 o'clock, the result is 0;a is 0 o'clock, and the result is 1 |
OR |
Or |
Binocular operator |
The result is "false" when A or B indicates "false" for A or b,a and B, or "True" |
Xor |
XOR or |
Binocular operator |
A XOR B means "True" if A or b,a, B is not equal, or False |