- Course
- Introduction to C#
- First program in Visual Studio Code
First program in Visual Studio Code
Last updated:
8/22/2020
Visual Studio Code is a free code editor created by Microsoft open source and compatible for Windows, Linux and Mac.
You can download it from code.visualstudio.com. Once the main code editor screen is installed it will look like the following image.
After completing the installation process open a console and execute the following command to create the structure of a new console project in C#.
dotnet new console -o helloworld
The structure of an empty console project in C# is like the following image:
After writing the source code we can compile it and execute it using Framework .NET Core from VS Code we just have to execute the following command from a new terminal.
dotnet run
The example produces the following output: