Visual Basic

Value Type and Reference Type

What is Value Type and Reference Type?

Value types are variables that comyain the data directly instead of containing a reference to the data stored elsewhere in memory.  Instances of value types are stored in an area of memory called stack.

Be the first to comment - What do you think?  Posted by admin - March 22, 2010 at 11:08 am

Categories: C Sharp, Visual Basic   Tags: ,

The if Statement in .net

If statment is very useful in decision making.  We will examine different ways of using if statment in VB and  C# (Visual basic and C Sharp).

The simplest use of an if statement is as follows:

if  (<condition>)
      <code executed if <test> is true>:

In this the code is executed when the test condition is true.

Additional code can be executed if the condition fails by adding else statement.

 else <code executed if <test> is false>;

Here is some example of testing some conditions.

if (checkbox1.Checked ==true)

if  (label1.BackColor == Color.Black)

if (numTiers == 4)

Be the first to comment - What do you think?  Posted by admin - February 4, 2010 at 10:46 pm

Categories: C Sharp, Visual Basic   Tags: , , ,