Console Applications in VB.NET 2008

What are Console Applications in VB.NET?


Console Applications in VB.NET 2008

Console Applications in VB.NET 2008 is used to reduce the space occupied by Windows Application usually developed in Using the Console Application, a user is prompted to input data and display the output in a DOS prompt.
Console applications can be created by opting New Projects->Console Application

All the Console Applications by default have a module Module1 and the code is included inside Sub Main() - End Sub. Just like applications the code is executed using Debug->Start Debugging option. But the result is displayed in a Console Window or a DOS Window instead of a form.

Module Module1
Sub Main()
System.Console.WriteLine("HELLO WORLD")
End Sub
End Module


In the above example the text "HELLO WORLD" is displayed in the Console Window.

In the above example, System.Console is a namespace, which is a collection of classes and datastructures that can be used for a specific purpose.

A Module contains a group of functions. Modules are used to create common functions, that can be called from anywhere if declared as 'Public'.

Visual Basic Tutorial

Ask Questions

Ask Question