Creating (and executing) a simple console application
Let’s start by opening Visual Studio Code and displaying the integrated terminal window by going to View | Terminal.
Next, position yourself where you want the code folder to be created (I always create a code
folder in my C:
drive where all my code folders are located; I find it convenient to centralize all my code at the same location).
After ensuring that you are in the right working directory, type the following command to create a .NET console application:
$ dotnet new console -n helloConsole -o helloConsole --use-program-main
Let’s break down this command to understand what it does:
dotnet new console
: This will ask the .NET CLI tool to create a new console application. This will use C# as a language and .NET 8 as a framework (since these are the default values).-n helloConsole
: Our application will be namedhelloConsole
.-o helloConsole
: AhelloConsole
folder will be created that...