Hello World Console App C#

Leave a comment

Creating a console application in C# is really easy. Let’s go through a Hello World example.

First, create a new project in Visual Studio. Give the project a name:

The project contains a Program.cs file, which contains a static Main method:

This method will be called first when the application is run – it is the entry point of the application. It is static and declared as a class or struct.

If we put a breakpoint on the main method, and debug, we can see the debugger is called:

Let’s add some code to the main method. We will simply write out Hello World to the console.

Hit F5 to run the application.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

See more articles on: C#

Leave a Reply

Your email address will not be published. Required fields are marked *