Console Application in Visual Basic .NET

In this article, I will explain you about Console Application and it execution in Visual Basic .NET.
  • 14865

In this article, I will explain you about Console Application and it execution in Visual Basic .NET.

Console Application

Console Applications have recently been introduced in Visual Basic .NET, they are command-line based applications. Console Applications allow us to write data to the console read data from the console, and run in within a DOS Shell. They do not support Windows GUI's. Console Applications are supported by the System.Console namespace.

Example:

Goto Start-->All Program-->Microsoft Visual Studio 2010.

img1.gif

Select New Project on the Start Page

img2.gif

Select language Visual Basic and Console Application from New Project window and press OK button.

img3.gif

Now place the code given below in Module1.

Imports System.Console
Module Module1
 
    Sub Main()
        System.Console.Write("This is my first Console Application")
        Read()
    End Sub
 
End Module

img4.gif

And now press the Start Debugging button or F5 button on your keyboard to execute the Console Application.

The output of Console Application is:

img5.gif
 
Summary

Hope this article help you to Understand about Console Application and its execution in Visual Basic.

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.