Building a C# console application
With the proper tools in place, you can now begin building your first .NET application with C#. In this walkthrough, you’ll be creating a console application, which is an application that can be run in the command line. To get started, you must create and run the app in the command line, then make changes to it in Visual Studio Code.
Let’s start with the following steps:
- Open your default command line, which is Command Prompt on Windows or Terminal on macOS and Linux.
- In the command line, type the following command:
dotnet new console –o MyFirstApp
- Press Enter.
After pressing Enter, you may see some additional text if this is your first time working with .NET, but at the end, you should see a few status messages, ending with Restore succeeded:
Figure 5.9 – Creating a console app in the Windows Command Prompt
- Continue by typing the following command in the command...