Sie sind auf Seite 1von 20

VB.

NET
Jhune Hay Mitra
Intructor 1
What is VB.NET
Visual Basic .NET is a simple, Modern, Object-Oriented
language and a Rapid Application Development (RAD)
tool which is generally Implemented on the Mircrosoft .NET
Framework
.NET is not a language
Language provided by Microsoft
VB, C++, C#, J#, JScript
What can you do with VB.NET ?
Windows Applications
Web Applications
Database Applications
Application for Mobile Devices
Data Types
Type Description
Byte 0 to 255
Integer -32, 768 to 32, 768
Long -2, 147, 483, 648 to 2, 147,
483, 648
Single -2, 147, 483, 648 to 2, 147,
483, 648
Double 5.0 x 10-324 to 1.7 x 10308
Short -32, 768 to 32, 768
Boolean True or False
Char 0 to 65535
String 0 to approximately 2
billion Unicode characters
Declaring Values
BasicUnit of storage
Defined by combination of an identifier (name), type &
Optionally an Initial value
Declaring Value
Naming Rules
You must use a letter as the first character
You can't use a space, period ( . ), exclamation mark ( ! ),
or the characters @, &;, $, # in the name.
Name can't exceed 255 characters in length.
You shouldn't use any names that are the same as
the functions, statements, and methods in Visual Basic.
Declaring Value
Comments in Visual Basic
Single Line Only
REM Single Line Only

Comments in Visual Basic
Arithmetic Operators
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
^ Exponentiation
mod Modulus
Sample Using MOD Operator
Relational Operators
Operator Description
< Less than
> Greater Than
<= Less than equal
> Greater Than or Equal to
= Equal to
<> Not Equal to
Relational Operators
Logical Operators
Operator Description
And Evaluation AND
Or Evaluation OR
Xor Evaluation Xor
Not Negation
Andalso Evaluation And
OrElse Evaluation Or
Logical Operators
If then else Statement
An If statement can be followed by an
optional Else statement, which executes when the Boolean
expression is false.
If the Boolean expression evaluates to true, then the if block
of code will be executed, otherwise else block of code will
be executed.
If then else Statement
Do Loop
It
repeats the enclosed block of statements while a Boolean
condition is True or until the condition becomes True. It
could be terminated at any time with the Exit Do statement.
Do Loop

Output:

Das könnte Ihnen auch gefallen