Professional Documents
Culture Documents
Unit One: Getting Started With Visual Basic
Unit One: Getting Started With Visual Basic
Comparison operators
Logical operators
Concatenation operators
OPERATORS
Arithmetic operators are used to perform
arithmetic calculations such as addition and
subtraction.
Comparison operators are used to compare two or
more values.
Logical operators are used to perform logical
operations such as AND, OR, NOT on one or more
expressions.
Concatenation operators are used to join two string
values.
& and + arethe two concatenation operators
available in VB.NET.
The operator & is used to concatenate two strings
and + is used to add two numbers and concatenate
two strings.
ARITHMETIC OPERATORS
Operator Purpose Example: Output
Let a=10
+ Addition b=a+5 55
- Subtraction c=a–5 45
* Multiplication d = a * 10 500
/ Division e=a/6 8.33
Division (integer
part only given
\ f=a\6 8
as output)
Modulas
(Remainder after
MOD g = a mod 7 1
division)
Check if a value is
greater than or
>= b=(a>=50) TRUE
equal to another