«^»
3. VB using just the .NET Framework

The .NET Framework can be downloaded free of charge. In the future, it will be included as part of the Windows operating system.

Note: At the present time, there are two .NET Framework downloads: there is a .NET Framework Redistributable which software developers can give away with their products, and there is also a .NET Framework SDK which includes the compilers for Visual Basic.NET and C#. Although both of these downloads can currently be downloaded for free, I am unclear as to whether both will form part of future versions of the Windows operating system.

Rant: It is interesting to note that Microsoft are now giving away compilers: this once again makes it difficult for other software developers to offer competing products.

So you just need the .NET Framework in order to compile and execute Visual Basic.NET programs or C# programs. The compilers are in files called vbc.exe and csc.exe. On my laptop these files are in the directory:

E:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

So, in a command shell window, add the appropriate directory to the path:

path=E:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;%path%

Then use your favourite text editor to produce a program in VB.NET. For example, suppose you use a text editor to produce a file called Module1.vb that contains the following text. Note: ignore the line numbers that appear in this document: they do not form part of the programs:

0001: Imports System
0002: Module Module1
0003: 
0004:     Sub Main()
0005:         Console.Write("Centigrade value: ")
0006:         Dim tCentigradeString As String = Console.ReadLine()
0007:         Dim tCentigrade As Double = Double.Parse(tCentigradeString)
0008:         Dim tFahrenheit As Double = 32 + tCentigrade * 9 / 5
0009:         Console.WriteLine("Fahrenheit value: " & tFahrenheit)
0010:     End Sub
0011: 
0012: End Module

This program can then be compiled using the command line:

vbc Module1.vb

This produces a file called Module1.exe that can be executed in the usual way:

Module1