Visual Basic 2008 9.0 .NET Examples and Ebook

Learn to program Visual Basic, study examples and make exercises.

This website is intended as a self study guide or tutorial for experienced programmers and for people new to Visual Basic.

Experienced developers can read about what's New in Visual Basic 9.0 ( 2008 ).

People new to Visual Basic better read through this page, and start with the Introduction to Visual Basic chapter.

Do you want an Introduction to Object Oriented Programming , several articles on this website cover this topics.

The most recent versions, Visual Basic 9.0 ( 2008 ) and .NET Framework 3.5 are used throughout this website.
Most examples are compatible with Visual Basic 7.0 ( 2003 ) and 8.0 ( 2005 ) and .NET Framework 2.0 and 3.0.

Download and install the free Visual Basic 2008 Express Edition to execute and modify all examples and exercises.  Click here to download this version.

Following is a list with all available chapters and topics, all containing sourcecode examples and exercises.  Now with 262 sourcecode examples, 42 topics and 5 chapters.  This list is often updated.

Read the explaination ( after the list ) on how to execute and change these examples in Visual Studio.


All Chapters and Topics

Chapter : New in Visual Basic 2008 - 9.0


Partial Methods  Topic  Partial Methods   New !
Local Type Inference  Topic  Local Type Inference   New !
Object Initializers  Topic  Object Initializers   New !
Anonymous Types  Topic  Anonymous Types   New !
Argument Passing  Topic  Argument Passing   New !
Extension Methods  Topic  Extension Methods   New !
Relaxed Delegates  Topic  Relaxed Delegates   New !
Lambda Expressions  Topic  Lambda Expressions   New !
Query Methods  Topic  Query Methods   New !
LINQ - Language Integrated Query  Topic  LINQ - Language Integrated Query   New !


Chapter : Introduction to Visual Basic


Output and Comments in Modules  Topic  Output and Comments in Modules
Variables  Topic  Variables
Some Operators  Topic  Some Operators
Reading Input from the User  Topic  Reading Input from the User
Introduction to Selections  Topic  Introduction to Selections
Introduction to Iterations  Topic  Introduction to Iterations
Nested Structures  Topic  Nested Structures
Iterations  Topic  Iterations
Selections  Topic  Selections
Boolean Datatype and Expressions  Topic  Boolean Datatype and Expressions
Operators  Topic  Operators
Datatypes  Topic  Datatypes
Constants  Topic  Constants


Chapter : Arrays


Introduction to Arrays  Topic  Introduction to Arrays
Multidimensional Arrays  Topic  Multidimensional Arrays
Dynamical Arrays  Topic  Dynamical Arrays
Array Initializers and For Each Next  Topic  Array Initializers and For Each Next
Array Datatype and Jagged Arrays  Topic  Array Datatype and Jagged Arrays
Searching in Arrays  Topic  Searching in Arrays
Sorting Arrays  Topic  Sorting Arrays


Chapter : Procedures and Functions


Introduction to Procedures  Topic  Introduction to Procedures
Local, Module and Static Variables  Topic  Local, Module and Static Variables
Introduction to Functions  Topic  Introduction to Functions
Methods and Arguments  Topic  Methods and Arguments


Chapter : Object Oriented Programming


Introduction to Object Oriented Programming  Topic  Introduction to Object Oriented Programming   Updated !
Properties  Topic  Properties   Updated !
Implementation  Topic  Implementation   Updated !
Containment  Topic  Containment   Updated !
Collections - Introduction  Topic  Collections - Introduction   Updated !
Inheritance  Topic  Inheritance   Updated !
Method Overloading  Topic  Method Overloading   Updated !
Constructors  Topic  Constructors   Updated !


Visual Studio Projects and Solutions


To build an application we'll need a project.  A project is a technological part of the system we're developing ( also called solution ).  Different project types exists, examples of project types are console applications, window applications and web applications.

A solution is the collection of projects, together with some configuration between these projects, needed to create our system.


Console Applications


All examples and exercises on this website are made for console applications.

These are applications with limited possibilities for input and output, and are mainly inteded for commandline programs.  Other types of projects, for instance window applications, have a more extended GUI ( "Graphical User Interface" ), but are harder to define.

Console applications are used on this website to maintain all examples clear and simple.


Modules and Classes


A module or class is used as a codingblock were we'll define our sourcecode.

A class can also be used to define a object oriented construction.


Execute the Examples of this Website


After installing Visual Studio, you have to create a console application.

In this application you can insert the sourcecode documents you've downloaded from this website.  You can do this by clicking the "Add Existing Item ..." option, in the "Project" menu.  The appearing dialog can be used to select the document(s) to add.

All you need to do know is to let the project ( console application ) know what module ( or class ) needs to be executed.  This startup object can be set in the options of the project.  In Visual Studio these settings can be reached by option "<name-of-the-project> Properties ..." in menu "Project".  On the "Application" tab, in the "Startup object" option, choose the name of the module ( or class ) you want to execute.


This version ( published on 2008-06-24 ) is printed from http://www.studyvb.com, visit the website for more recent information.


Updated On : 2008-05-29

Published On : 2008-06-24

Nederlands  Nederlands

Add to favorites (IE).

Visual Basic Examples ( Dutch )