Hello World in Visual Basic .NET

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.
Tutorial Difficulty Level    

This is how you would display “Hello World” in Visual Basic.

' Allow easy reference to the System namespace classes.
Imports System

' This module houses the application's entry point.
Public Module modmain
   ' Main is the application's entry point.
   Sub Main()
     ' Write text to the console.
     Console.WriteLine ("Hello World using Visual Basic!")
   End Sub
End Module

The command line for compiling the program is the following:

vbc.exe /t:exe /debug+ /optionstrict+ /out:.\HelloVB.exe HelloWorld.vb

In the previous line, /out specifies the output file, and /t indicates the target type.