C# Console application

C# is one of the languages provided by Microsoft to work with .Net. This language encompasses a rich set of features, which allows the development of different types of applications. C# is an object-oriented programming language and resembles several aspects of the C++ Language. In this tutorial, we see how to develop our first application.

What is Console Application?

A console application, in the context of C#, is an application that takes input and displays output at a command-line console with access to three basic data streams: standard input, standard output, and standard error. A console application facilitates the reading and writing of characters from a console - either individually or as an entire line. It is the simplest form of a C# program and is typically invoked from the Windows command prompt. A console application usually exists in the form of a stand-alone executable file with minimal or no graphical user interface (GUI).

Building First Console Application

A console application is an application that can be run in the command prompt in Windows. For any beginner on .Net, building a console application is ideally the first step, to begin with.

Step 1:- The first step involves the creation of a new project in Visual Studio. For that, once the Visual Studio is launched, you need to choose the menu option New->Project.

First console application create new project

Step 2:- The next step is to choose the project type as a Console application. Here, we also need to mention the name and location of our project.

First console application create console application

Step 3:- Now let's write our code which will be used to display the string "Hello World" in the console application.

First console application create code

Then Build successfully and Run the program.


First console application show output

Write a comment

Name Email Message