vb.net connection operators and logical operators

Source: Internet
Author: User
Tags logical operators square root

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.