﻿ VB.NET tutorial-Operators

# VB.NET Tutorial: Operators

## Operators in VB.NET

### Assignment Operator (=)

= sign is used as the assignment operator in VB.NET.
Example:
Dim x As Integer
x=10 'assign 10 to x variable

﻿

### Arithmetic operators

Arithmetic operators are used to do mathematic operations.
 Operator Description Example Result + Addition a=1+2 3 - Subtraction a=3-1 2 * Multiplication a=2*5 10 / Division 10/2 5 Mod Modulus (division remainder) 10 Mod 2 0 ^ Power a=3^2 a=9 \ Integer division a=3\2 a=1

### Comparison operators

The comparison operators are used in comparing values.

 Operator Description Example = equal to 1=2 evaluated to false <> not equal 1<>2 evaluated to true > greater than 1>2 evaluated to false < less than 1<2 evaluated to true >= greater than or equal to 1>=2 evaluated to false <= less than or equal to 1<=2 evaluated to true

﻿
 Why and How to learn C programming language? C++ programming language? C# programming language? Java programming language? Python programming language? VB programming language?
﻿

Phan Neth, CICI, year 3:

Now it is ok teacher. I can connect to database and select data from it. Than you so much teacher !!!!!

04-30-2013

Dara:

Copy and paste the link below to the address box to learn how to connect C and Mysql server:
http://www.worldbestlearningcenter.com/index_files/cpp-tutorial-connect_mysql_database.htm

04-27-2013

Phan Neth, CICI, year 3:

Hello teacher i want to connect C programming language to MySql server but it have problem. When i compile it always error with library " my_global.h
and mysql.h", so how should i do?

04-27-2013

Phan Neth, Year 3 at CICI,:

I have some problem about connection to mysql server. So I hope teacher can help me. Thank !!!!

04-26-2013

Federico:

Output appears the same also this way:

static void Main(string[] args)
{
int[,] myArray = new int[5, 5];
int row, i;
int n = 1;

for (row = 0; row < 5; row++)
{
for (i = 0; i < 5; i++)
{
myArray[row, i] = n;
if (row == 1 && i == 2) Console.Write(" \t");
else Console.Write("{0} \t", n);

if (n!=26) n++;
if((i+1)%5==0) Console.WriteLine("\n");
}
}
}

04-13-2013

Dara:

Let pointer p point to the index 1 elem (value=2) of the array.
int *p= a+1;
Let pointer q point to the index 6 elem (value=5) of the array.
int *q= a+6;
-Expression q-p is the subtraction of address of the index 6 element and the address of index 1 elem of the array. So, the result is 5.
-Expression *p+*q is the sum of the value of index 1 elem (2) and the value of index 6 elem (5). So, the result is 7.
In conclusion, the output is 57.

03-28-2013

Anushka :

Find the output of following code
main()
{
int a[] = {1,2,9,8,6,3,5,7,8,9};
int *p= a+1; int *q= a+6;
cout<< q-p <<*p+*q; }

03-28-2013

Dara:

Option Explicit
Dim Cn as New ADODB.Connection