Our Pretty Little Program

    Today, we will handle the most common first coding lesson around the world. We always code the first program that says hello world. I think that thing has already become a tradition for the computing world. Also, I will provide a couple of useful screenshots on how to create a project in Visual Studio, so bear with me.

 

This is the screen that welcomes us if you have freshly installed Visual Studio 2022. I will choose the last option to create a new project, so will you.

 

    On the next screen, we need to type console into the search box. A lot of options will appear, but make sure you choose the console app for C#, as you can see in the screenshot. Because we are gonna code C# for our console app, not Visual Basic or any other option.

    There you go, if you click all the next buttons until now. This is the screen that has program configurations. I will follow the sector tradition and call my program Hello World. You can do the same things or call it something else; it is totally up to you. The rest you do not need to touch for now. When the time comes, I will explain every corner of our development environment.
 

On this screen, we just need to select relevant .Net Framework version. I use 8.0 for long term support. So make sure your screen is same with mine then just click the create button.


 This is what we get when we click the create button. Basically, it says when the program runs, print the Hello World text to the command line.

As you can see on the screen, the command window came up and shows printed text on the command line. For having that, you just need to hit the F5 button or the little green right arrow on the toolbox. It debugs your program and runs it if there is no error in your code.
 


Installing Visual Studio for Development

    


 In this post, I will explain and demonstrate how to install a development environment to code C#. Also, I will use Visual Studio for the following post too. If you are using third-party software to develop your programs, you are very welcome to do that. But I can not provide any support if you come across any problems. The best practice is just using the latest version of the Visual Studio Community. The community version is free and covers most programming languages and developing applications. I am using Windows 10 as an operating system, but it is your call to use a different supported operating system by Visual Studio. This is the link you can use to download the latest version. (My one is 2022)
https://visualstudio.microsoft.com/downloads/
After you get the installer, just run it. You will see the workloads tab. You need to select the following packages to install because we will need them later.
ASP.NET and web development
.NET desktop development
Desktop Development with C++
After choosing packages, just click the install button and wait for the full installation. Your development environment is ready.

© all rights reserved
made with by templateszoo