SlideShare a Scribd company logo
Introduction to VB.NET
BCA -501
2
Content
 What is VB.NET?
 Features of VB.NET
 VB.NET as a Professional Language
 Advantages of VB.NET
 Disadvantages of .NET
 VB.NET Program Structure
 Compilation and Execution of VB.NET Program
 Example
3
What Is .NET?
 The VB.NET stands for Visual Basic. Network Enabled Technologies.
 It is a simple, high-level, object-oriented programming language developed by
Microsoft in 2002.
 It is a successor of Visual Basic 6.0, that is implemented on the Microsoft .NET
framework.
 Furthermore, it supports the OOPs concept, such as abstraction, encapsulation,
inheritance, and polymorphism. Therefore, everything in the VB.NET language is an
object, including all primitive data types (Integer, String, char, long, short, Boolean,
etc.), user-defined data types, events, and all objects that inherit from its base class.
 It is not a case sensitive language, whereas, C++, Java, and C# are case sensitive
language.
 Applications built using the VB.NET language are very reliable and scalable, relying
on the .NET Framework to access all libraries that help to execute a VB.NET
program.
 Applications or programs of VB.NET are not only running on the window operating
system but can also run on Linux or Mac OS.
4
Features of VB.NET:-
 It is an object-oriented programming language that follows various oops concepts such as
abstraction, encapsulation, inheritance, and many more. It means that everything in VB.NET
programming will be treated as an object.
 This language is used to design user interfaces for window, mobile, and web-based applications.
 It supports a rapid application development tool kit. In which a developer does not need to write
all the codes as it can get various code automatically from its libraries. For example, when we
create a form in Visual basic.net, it automatically calls events of various form in that class.
 It supports Boolean condition for decision making in programming.
 It also supports the multithreading concept, in which you can do multiple tasks at the same time.
 It provides simple events management in .NET application.
 A Window Form enables us to inherit all existing functionality of form that can be used to create a
new form. So, in this way, it reduced the code complexity.
 It uses an external object as a reference that can be used in a VB.NET application.
 Automatic initialized a garbage collection.
 It follows a structured and extensible programming language for error detection and recovery.
 Conditional compilation and easy to use generic classes.
5
Why VB.NET as a Professional Language?
The following reasons make VB.Net a widely used professional language −
 Modern, general purpose.
 Object oriented.
 Component oriented.
 Easy to learn.
 Structured language.
 It produces efficient programs
 It can be compiled on a variety of computer platforms.
 Part of .Net Framework.
6
Advantages of VB.NET
 The VB.NET executes a program in such a way that runs under CLR (Common Language
Runtime), creating a robust, stable, and secure application.
 It is a pure object-oriented programming language based on objects and classes. However,
these features are not available in the previous version of Visual Basic 6. That's why Microsoft
launched VB.NET language.
 Using the Visual Studio IDE, you can develop a small program that works faster, with a large
desktop and web application.
 The .NET Framework is a software framework that has a large collection of libraries, which
helps in developing more robust applications.
 It uses drop and drag elements to create web forms in .NET applications.
 However, a Visual Basic .NET allows to connect one application to another application that
created in the same language to run on the .NET framework.
 A VB.NET can automatically structure the code.
 The Visual Basic .NET language is also used to transfer data between different layers of the .NET
architecture such that data is passed as simple text strings.
 It uses a new concept of error handling in the Visual Basic .NET Framework. The new structure
is the try, catch, and finally method used to handle exceptions as a unit. In addition, it allows
appropriate action to be taken at the place where it encountered an error. In this way, it
discourages the use of the ON ERROR GOTO statement in .NET programming.
7
Disdvantages of VB.NET
 The VB.NET programming language is unable to handle pointers directly. Because in this
language, it requires a lot of programming, and it is not easy to manage every address by a
pointer. Furthermore, additional coding takes extra CPU cycles, that increases the processing
time. It shows the slowness of the VB.NET application.
 The VB.NET programming is easy to learn, that increases a large competition between the
programmers to apply the same employment or project in VB.NET. Thus, it reduces a secure job
in the programming field as a VB.NET developer.
 It uses an Intermediate Language (IL) compilation that can be easily decompiled (reverse
engineered), but there is nothing that can prevent an application from disintegrating.
 Just-In-Time (JIT) compiler: It is the process through which a computer can interpret IL
(intermediate language) compilation and is also required to run your application. It means that the
target computer needs a JIT compiler to interpret a source program in IL, and this interpretation
requires an additional CPU cycle that degrades the performance of an application.
 It contains a large collection of libraries for the JIT compiler that helps to interpret an application.
These large libraries hold a vast space in our system that takes more computing time.
8
VB.NET Program Structure
A VB.Net program basically consists of the following parts −
 Namespace declaration
 A class or module
 One or more procedures
 Variables
 The Main procedure
 Statements & Expressions
 Comments
9
VB.NET Program Structure
 The first line of the program Imports System is used to include
the System namespace in the program.
 The next line has a Module declaration, the module Module1.
VB.Net is completely object oriented, so every program must
contain a module of a class that contains the data and
procedures that your program uses.
 Classes or Modules generally would contain more than one
procedure. Procedures contain the executable code, or in other
words, they define the behavior of the class.
 The next line( 'This program) will be ignored by the compiler and
it has been put to add additional comments in the program.
 The next line defines the Main procedure, which is the entry point
for all VB.Net programs. The Main procedure states what the
module or class will do when executed.
 The Main procedure specifies its behavior with the statement
 Console.WriteLine("Hello World") WriteLine is a method of
the Console class defined in the System namespace. This
statement causes the message "Hello, World!" to be displayed on
the screen.
 The last line Console.ReadKey() is for the VS.NET Users. This
will prevent the screen from running and closing quickly when the
program is launched from Visual Studio .NET.
Imports System
Module Module1
'This program will display Hello World
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
End Module
Note: A procedure could be any of the following −
 Function
 Sub
 Operator
 Get
 Set
 AddHandler
 RemoveHandler
 RaiseEvent
10
Compilation and Execution VB.NET Program
In Visual Studio.Net IDE following steps are
used
1. Start Visual Studio.
2. On the menu bar, choose File → New →
Project.
3. Choose Visual Basic from templates
4. Choose Console Application.
5. Specify a name and location for your
project using the Browse button, and then
choose the OK button.
6. The new project appears in Solution
Explorer.
7. Write code in the Code Editor.
8. Click the Run button or the F5 key to run
the project. A Command Prompt window
appears that contains the line Hello World.
In Visual Studio IDE following steps are used
1. Open a text editor and add the above
mentioned code.
2. Save the file as helloworld.vb
3. Open the command prompt tool and go to
the directory where you saved the file.
4. Type vbc helloworld.vb and press enter to
compile your code.
5. If there are no errors in your code the
command prompt will take you to the next
line and would
generate helloworld.exe executable file.
6. Next, type helloworld to execute your
program.
7. You will be able to see "Hello World"
printed on the screen.
11
VB.NET Program Example
Imports System
Module Module1
'This program will display Hello World
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
End Module

More Related Content

What's hot

Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
Bagzzz
 
Web application
Web applicationWeb application
Web application
maliksiddique1
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Neeru Mittal
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
Sanay Kumar
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
SAMIR BHOGAYTA
 
Web Application
Web ApplicationWeb Application
Web Application
Sameer Poudel
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
Ahllen Javier
 
Visual basic
Visual basicVisual basic
Visual basic
sanjay joshi
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computersimran153
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
Anjan Mahanta
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Andres Baravalle
 
VB.net
VB.netVB.net
VB.net
PallaviKadam
 
Classification of Programming Languages
Classification of Programming LanguagesClassification of Programming Languages
Classification of Programming Languages
Project Student
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
Dr. C.V. Suresh Babu
 

What's hot (20)

Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Web application
Web applicationWeb application
Web application
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Web Application
Web ApplicationWeb Application
Web Application
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
Visual basic
Visual basicVisual basic
Visual basic
 
Vb introduction.
Vb introduction.Vb introduction.
Vb introduction.
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Meaning Of VB
Meaning Of VBMeaning Of VB
Meaning Of VB
 
VB.net
VB.netVB.net
VB.net
 
Classification of Programming Languages
Classification of Programming LanguagesClassification of Programming Languages
Classification of Programming Languages
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
 

Similar to Introduction to vb.net

.Net framework
.Net framework.Net framework
.Net frameworkRaghu nath
 
Unit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdfUnit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdf
Ujwala Junghare
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checker
Yesu Raj
 
The seven pillars of aspnet
The seven pillars of aspnetThe seven pillars of aspnet
The seven pillars of aspnet
Nethaji Naidu
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRaining
sunil kumar
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
Yesu Raj
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
Yesu Raj
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions9292929292
 
dot net
dot netdot net
dot net
sambhajimeher
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
KALIDHASANR
 
A simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB TechA simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB Tech
Pooja Gaikwad
 
A simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-frameworkA simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-framework
sonia merchant
 
235042632 super-shop-ee
235042632 super-shop-ee235042632 super-shop-ee
235042632 super-shop-ee
homeworkping3
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
Kamal Acharya
 
Rcs project Training Bangalore
Rcs project Training BangaloreRcs project Training Bangalore
Rcs project Training Bangalore
Sunil Kumar
 
Unit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdfUnit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdf
Ujwala Junghare
 

Similar to Introduction to vb.net (20)

Mca 504 dotnet_unit1
Mca 504 dotnet_unit1Mca 504 dotnet_unit1
Mca 504 dotnet_unit1
 
.Net framework
.Net framework.Net framework
.Net framework
 
Unit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdfUnit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdf
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checker
 
The seven pillars of aspnet
The seven pillars of aspnetThe seven pillars of aspnet
The seven pillars of aspnet
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRaining
 
The Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.NetThe Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.Net
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions
 
dot net
dot netdot net
dot net
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
 
A simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB TechA simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB Tech
 
A simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-frameworkA simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-framework
 
235042632 super-shop-ee
235042632 super-shop-ee235042632 super-shop-ee
235042632 super-shop-ee
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
Rcs project Training Bangalore
Rcs project Training BangaloreRcs project Training Bangalore
Rcs project Training Bangalore
 
Unit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdfUnit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdf
 

More from Jaya Kumari

Python data type
Python data typePython data type
Python data type
Jaya Kumari
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Jaya Kumari
 
Variables in python
Variables in pythonVariables in python
Variables in python
Jaya Kumari
 
Basic syntax supported by python
Basic syntax supported by pythonBasic syntax supported by python
Basic syntax supported by python
Jaya Kumari
 
Oops
OopsOops
Inheritance
InheritanceInheritance
Inheritance
Jaya Kumari
 
Overloading
OverloadingOverloading
Overloading
Jaya Kumari
 
Decision statements
Decision statementsDecision statements
Decision statements
Jaya Kumari
 
Loop control statements
Loop control statementsLoop control statements
Loop control statements
Jaya Kumari
 
Looping statements
Looping statementsLooping statements
Looping statements
Jaya Kumari
 
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
Jaya Kumari
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NET
Jaya Kumari
 
Keywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.netKeywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.net
Jaya Kumari
 
Frame class library and namespace
Frame class library and namespaceFrame class library and namespace
Frame class library and namespace
Jaya Kumari
 
Introduction to .net
Introduction to .net Introduction to .net
Introduction to .net
Jaya Kumari
 
Jsp basic
Jsp basicJsp basic
Jsp basic
Jaya Kumari
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
Jaya Kumari
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
Jaya Kumari
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
Jaya Kumari
 
Html form
Html formHtml form
Html form
Jaya Kumari
 

More from Jaya Kumari (20)

Python data type
Python data typePython data type
Python data type
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Variables in python
Variables in pythonVariables in python
Variables in python
 
Basic syntax supported by python
Basic syntax supported by pythonBasic syntax supported by python
Basic syntax supported by python
 
Oops
OopsOops
Oops
 
Inheritance
InheritanceInheritance
Inheritance
 
Overloading
OverloadingOverloading
Overloading
 
Decision statements
Decision statementsDecision statements
Decision statements
 
Loop control statements
Loop control statementsLoop control statements
Loop control statements
 
Looping statements
Looping statementsLooping statements
Looping statements
 
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NET
 
Keywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.netKeywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.net
 
Frame class library and namespace
Frame class library and namespaceFrame class library and namespace
Frame class library and namespace
 
Introduction to .net
Introduction to .net Introduction to .net
Introduction to .net
 
Jsp basic
Jsp basicJsp basic
Jsp basic
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
 
Html form
Html formHtml form
Html form
 

Recently uploaded

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 

Recently uploaded (20)

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 

Introduction to vb.net

  • 2. 2 Content  What is VB.NET?  Features of VB.NET  VB.NET as a Professional Language  Advantages of VB.NET  Disadvantages of .NET  VB.NET Program Structure  Compilation and Execution of VB.NET Program  Example
  • 3. 3 What Is .NET?  The VB.NET stands for Visual Basic. Network Enabled Technologies.  It is a simple, high-level, object-oriented programming language developed by Microsoft in 2002.  It is a successor of Visual Basic 6.0, that is implemented on the Microsoft .NET framework.  Furthermore, it supports the OOPs concept, such as abstraction, encapsulation, inheritance, and polymorphism. Therefore, everything in the VB.NET language is an object, including all primitive data types (Integer, String, char, long, short, Boolean, etc.), user-defined data types, events, and all objects that inherit from its base class.  It is not a case sensitive language, whereas, C++, Java, and C# are case sensitive language.  Applications built using the VB.NET language are very reliable and scalable, relying on the .NET Framework to access all libraries that help to execute a VB.NET program.  Applications or programs of VB.NET are not only running on the window operating system but can also run on Linux or Mac OS.
  • 4. 4 Features of VB.NET:-  It is an object-oriented programming language that follows various oops concepts such as abstraction, encapsulation, inheritance, and many more. It means that everything in VB.NET programming will be treated as an object.  This language is used to design user interfaces for window, mobile, and web-based applications.  It supports a rapid application development tool kit. In which a developer does not need to write all the codes as it can get various code automatically from its libraries. For example, when we create a form in Visual basic.net, it automatically calls events of various form in that class.  It supports Boolean condition for decision making in programming.  It also supports the multithreading concept, in which you can do multiple tasks at the same time.  It provides simple events management in .NET application.  A Window Form enables us to inherit all existing functionality of form that can be used to create a new form. So, in this way, it reduced the code complexity.  It uses an external object as a reference that can be used in a VB.NET application.  Automatic initialized a garbage collection.  It follows a structured and extensible programming language for error detection and recovery.  Conditional compilation and easy to use generic classes.
  • 5. 5 Why VB.NET as a Professional Language? The following reasons make VB.Net a widely used professional language −  Modern, general purpose.  Object oriented.  Component oriented.  Easy to learn.  Structured language.  It produces efficient programs  It can be compiled on a variety of computer platforms.  Part of .Net Framework.
  • 6. 6 Advantages of VB.NET  The VB.NET executes a program in such a way that runs under CLR (Common Language Runtime), creating a robust, stable, and secure application.  It is a pure object-oriented programming language based on objects and classes. However, these features are not available in the previous version of Visual Basic 6. That's why Microsoft launched VB.NET language.  Using the Visual Studio IDE, you can develop a small program that works faster, with a large desktop and web application.  The .NET Framework is a software framework that has a large collection of libraries, which helps in developing more robust applications.  It uses drop and drag elements to create web forms in .NET applications.  However, a Visual Basic .NET allows to connect one application to another application that created in the same language to run on the .NET framework.  A VB.NET can automatically structure the code.  The Visual Basic .NET language is also used to transfer data between different layers of the .NET architecture such that data is passed as simple text strings.  It uses a new concept of error handling in the Visual Basic .NET Framework. The new structure is the try, catch, and finally method used to handle exceptions as a unit. In addition, it allows appropriate action to be taken at the place where it encountered an error. In this way, it discourages the use of the ON ERROR GOTO statement in .NET programming.
  • 7. 7 Disdvantages of VB.NET  The VB.NET programming language is unable to handle pointers directly. Because in this language, it requires a lot of programming, and it is not easy to manage every address by a pointer. Furthermore, additional coding takes extra CPU cycles, that increases the processing time. It shows the slowness of the VB.NET application.  The VB.NET programming is easy to learn, that increases a large competition between the programmers to apply the same employment or project in VB.NET. Thus, it reduces a secure job in the programming field as a VB.NET developer.  It uses an Intermediate Language (IL) compilation that can be easily decompiled (reverse engineered), but there is nothing that can prevent an application from disintegrating.  Just-In-Time (JIT) compiler: It is the process through which a computer can interpret IL (intermediate language) compilation and is also required to run your application. It means that the target computer needs a JIT compiler to interpret a source program in IL, and this interpretation requires an additional CPU cycle that degrades the performance of an application.  It contains a large collection of libraries for the JIT compiler that helps to interpret an application. These large libraries hold a vast space in our system that takes more computing time.
  • 8. 8 VB.NET Program Structure A VB.Net program basically consists of the following parts −  Namespace declaration  A class or module  One or more procedures  Variables  The Main procedure  Statements & Expressions  Comments
  • 9. 9 VB.NET Program Structure  The first line of the program Imports System is used to include the System namespace in the program.  The next line has a Module declaration, the module Module1. VB.Net is completely object oriented, so every program must contain a module of a class that contains the data and procedures that your program uses.  Classes or Modules generally would contain more than one procedure. Procedures contain the executable code, or in other words, they define the behavior of the class.  The next line( 'This program) will be ignored by the compiler and it has been put to add additional comments in the program.  The next line defines the Main procedure, which is the entry point for all VB.Net programs. The Main procedure states what the module or class will do when executed.  The Main procedure specifies its behavior with the statement  Console.WriteLine("Hello World") WriteLine is a method of the Console class defined in the System namespace. This statement causes the message "Hello, World!" to be displayed on the screen.  The last line Console.ReadKey() is for the VS.NET Users. This will prevent the screen from running and closing quickly when the program is launched from Visual Studio .NET. Imports System Module Module1 'This program will display Hello World Sub Main() Console.WriteLine("Hello World") Console.ReadKey() End Sub End Module Note: A procedure could be any of the following −  Function  Sub  Operator  Get  Set  AddHandler  RemoveHandler  RaiseEvent
  • 10. 10 Compilation and Execution VB.NET Program In Visual Studio.Net IDE following steps are used 1. Start Visual Studio. 2. On the menu bar, choose File → New → Project. 3. Choose Visual Basic from templates 4. Choose Console Application. 5. Specify a name and location for your project using the Browse button, and then choose the OK button. 6. The new project appears in Solution Explorer. 7. Write code in the Code Editor. 8. Click the Run button or the F5 key to run the project. A Command Prompt window appears that contains the line Hello World. In Visual Studio IDE following steps are used 1. Open a text editor and add the above mentioned code. 2. Save the file as helloworld.vb 3. Open the command prompt tool and go to the directory where you saved the file. 4. Type vbc helloworld.vb and press enter to compile your code. 5. If there are no errors in your code the command prompt will take you to the next line and would generate helloworld.exe executable file. 6. Next, type helloworld to execute your program. 7. You will be able to see "Hello World" printed on the screen.
  • 11. 11 VB.NET Program Example Imports System Module Module1 'This program will display Hello World Sub Main() Console.WriteLine("Hello World") Console.ReadKey() End Sub End Module