Program to print Hello World in VB.NET

Here, we are going to learn how to Program to print Hello World in VB.NET?
Submitted by Nidhi, on November 26, 2020 [Last updated : February 18, 2023]

Printing "Hello World"

We, will create a program in VB.Net to print the "Hello World" message on the console screen using WriteLine() method of Console class.

VB.Net code to print "Hello World"

The source code to print "Hello World" in VB.NET is given below. The given program is compiled and executed successfully.

'Program to print "Hello World" in VB.NET.

Module Module1
    
    Sub Main()
        Console.WriteLine("Hello World")
        Console.ReadLine()
    End Sub
    
End Module

Output:

Hello World

Explanation:

In the above program, we created a Module that contains the Main() method, here we printed the "Hello World" message using WriteLine() method of Console class on the console screen.

VB.Net Basic Programs »





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.