stu nicholls dot com | menu - Professional dropdown #3



Features of VB.NET

Visual Basic.NET marks the transition of visual basic to being a true object-oriented programming language. Full backward compatibility for code is not possible. Therefore, any code written in previous versions of visual Basic may have to be modified before it can run on the .NET framework.



.NET Basic Data Types and Variable

Type Storage Bytes
Boolean
2
Byte
1
Char
2
Date
8
Decimal
16
Double
8
Integer
4
Long
8
Object
4
Short
2
Single
4
String
Userdefined

Variable

The place where the program holds data is called a variable
Rules to be followed to create a variable name:

Keyword is a word that has special meaning in VB.NET


Variable

In VB.NET you use Dim statement to create a variable that represent a value type.

Example:

Dim d1 As Double
Dim d2 As Object
Dim d3, d4, d5 As Integer
Dim mymanipal As String
Dim a As Integer = 5
d1 = 12
d2 = “10.5”
d3 = 4
mymgm = “MGM College”

Declaring Constants

Syntax to declare a constant is as follows:
[Public|Private|Friend | Protected |Protected Friend] Const constant name [As type] = expression
E.g.: Public Const a As Integer = 5

Next>>


comments powered by Disqus
click here
click here
Footer1