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.