﻿ VB.NET tutorial-Operators( con)

# VB.NET Tutorial: Operators

## Operators in VB.NET

### Logical Operators

You can use logical operators to work with logical values ( true and false).

﻿

 Operator Description Example And and x=1 y=2 (x < 5 And y > 1) evaluated to true Or or x=1 y=2 (x>2 Or y>1) evaluated to true Not not x=1 y=2 Not(x=y) evaluated to true

### Compound Operators

Operators can be combined together.

 Operator Example The Same As += x+=y x=x+y -= x-=y x=x-y *= x*=y x=x*y /= x/=y x=x/y ^= x^=y x=x^y \ x\=y x=x\y

### String concatenation operator (&)

In VB.NET, & sign is used to concatenate strings or text.

Example:
Dim yourname As String
yourname="Yuk" &"Sovandara"

﻿
 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