How To Make A Console Application

by MichaelEpicACategory: Tech12 June, 2020

First things first, You need to download Visual Studio from this link, https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16 (if you already have Visual Studio skip this step.) Once Visual Studio is done installing move on to the next step. Second, create a new project by clicking on the Create a new project button. https://prnt.sc/sy5edp Search for Console App in the search bar and use Console App (.NET Framework). https://prnt.sc/sy5ezc and click Next. Finally, check the checkbox that says Place solution and project in the same directory. https://prnt.sc/sy5g1j and call it whatever you want here https://prnt.sc/sy5gll then just click Create. https://prnt.sc/sy5gyo Congrats, you should have Console.WriteLine("Hello World!"); in the coding space. If you click start https://prnt.sc/szbls3 it should open up and immediately close. The reason is it finishes running the code before you can even read the text. Write Thread.Sleep(5000); so that way it sleeps for 5 seconds before it closes. That line will look like this https://prnt.sc/szbk17. Easy fix. Hover over Thread and you should get this. https://prnt.sc/szbkmu Click the button that says show potential fixes. https://prnt.sc/szbl0m You will get a list of options, choose the one that says using System.Threading; https://prnt.sc/szblih The red line should go away and when you click start https://prnt.sc/szbls3 you should have a program that says Hello World for 5 seconds. Congrats! You made your first C# Application! Note: If you want an explanation of what System.Threading is, be on the lookout for my other tutorials that are not out yet.

Please login to comment.

Comments

TimTheMushroom

AdminAuthorTrusted

Anonymous si Ddos domain nos adepto vos nusquam comprehenderentur. Quasi ludens loqui circa illam quoque adepto vos in multum tribulationis.

Anonymous

Nos sunt Cornelius Tacitus In altera XXIV horas et ddosed hac domain.

MichaelEpicA

AuthorTrusted

Thanks, I probably will just edit this until I move on to more topics other than console applications.

TimTheMushroom

AdminAuthorTrusted

Thank you for showing us how to make a console application. If you like you can edit your post so in the future when you want to write on how to code you just edit your post.