Hello World in VB.NET

Whenever learning a new programming language, a good first step is to write and run a simple program that will display a single line of text. Such a program demonstrates the basic structure of the language, including output. Here is “Hello, world” in VB.NET (See the Hello directory for this chapter.)

' Hello.vb

Module Hello
   Public Sub Main()
      System.Console.WriteLine("Hello, world")
   End Sub
End Module

Compiling and Running (Command Line)

We already introduced the Microsoft Visual Studio .NET IDE (integrated development environment), and you can learn more in Appendix A.You can also use the command-line tools of the .NET Framework SDK. You will almost always use Visual Studio to build your programs rather than the command-line ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.