Chapter 2 Introduction To VB
Chapter 2 Introduction To VB
Overview of .NET
Microsoft .NET (pronounced dot net) is a software component that runs on the
Windows operating system. .NET provides tools and libraries that enable developers
to create Windows software much faster and easier. .NET benefits end-users by
providing applications of higher capability, quality and security. The .NET Framework
must be installed on a users PC to run .NET applications. All Microsoft technologies
depend on .NET Platform.
The .Net framework is a revolutionary platform that helps you to write the following
types of applications:
Windows applications
Web applications
Web services
Mobile Applications
Windows Forms
ADO.Net
LINQ
Visual Studio
Microsoft Visual Studio is an integrated development environment (IDE) from
Microsoft. It is used to develop for all most all types of computer programs.
Visual Basic
VB.Net is a simple, modern, object-oriented computer programming language
developed by Microsoft to combine the power of .NET Framework and the common
language runtime with the productivity benefits that are the hallmark of Visual
Basic. In another way, Visual Basic .NET (VB.NET) is an object-oriented computer
programming language implemented on the .NET Framework. Although it is an
evolution of classic Visual Basic language, it is not backwards-compatible with VB6,
and any code written in the old version does not compile under VB.NET. Visual Basic
is just BASIC with Windows libraries instead of DOS libraries. It is still BASIC. It has
all the BASIC keywords. It has the BASIC syntax. It is the BASIC language, just with
Windows libraries.
Like all other .NET languages, VB.NET has complete support for object-oriented
concepts. Everything in VB.NET is an object, including all of the primitive types
(Short, Integer, Long, String, Boolean, etc.) and user-defined types, events, and
even assemblies. All objects inherits from the base class Object.
Object oriented.
Component oriented.
Easy to learn.
Structured language.
The following code snippet is demonstrating the output statements for VB.NET in
console Application.
Imports System
Module Module1
Sub Main()
Console.WriteLine("Hello World") '' Output Statement
End Sub
End Module
The following code snippet is demonstrating the output statements for VB.NET in
console Application.
Imports System
Module Module1
Sub Main()
End Sub
End Module
The output statement can use Placeholders to print the output to console
Every Visual Basic application must contain a procedure called Main. This procedure
serves as the starting point and overall control for your application. The .NET
Framework calls your Main procedure when it has loaded your application and is
ready to pass control to it. Unless you are creating a Windows Forms application,
you must write the Main procedure for applications that run on their own.
Main contains the code that runs first. In Main, you can determine which form is to
be loaded first when the program starts, find out if a copy of your application is
already running on the system, establish a set of variables for your application, or
open a database that the application requires.