I had previously thought that programming (.NET) (pronounced "Dot net") would not be possible on Linux. After I learn and learn about (.NET) and the evidently can, not like what I thought before.
Image Source .NET platform
Image Source Github Octoverse 2016
Now let's get into the .NET (point)
What are C# and .NET?
C# (pronounced "C Sharp") is a programming language made by Microsoft that is designed to run on .NET. .NET itself is a platform for creating and running C#, F#, and VB programs. NET.



.NET there are several types:

The .NET Framework is a platform for creating Windows applications only; .NET Core is a platform that can be used on various platforms such as Linux and MacOS; XAMARIN is a .NET platform specifically for mobile. Which .NET are we going to use?
Of course we will use the .NET Core.
Equipment that must be prepared
There are several tools that we must prepare to do C # programming on Linux:
Text Editor (Visual Studio Code) for writing program code; Compiler (.NET SDK) for compiling program code.
That is all? That's right, that's all.
Actually there are other alternatives, namely using Monodevelop. However, as of this writing, I will only use equipment from Microsoft.
1. Prepare the Text Editor
Why do you have to use VS Code, can you not use another text editor?
It could be ...
However, I recommend VS Code because there are extensions that we can use to debug C# programs.
Please install VS Code page for a complete list of available installation options. Or Visual Studio Code is officially distributed as a Snap package in the Snap Store. You can install it by running?
sudo snap install --classic code # or code-insiders
Note: If snap isn't available in your Linux distribution, please check the following Installing snapd guide, which can help you get that set up.
After that, install the C# extension.
This extension is a kind of plug-in that we will use to debug the program.
2. Installing the .NET SDK on Linux
Different distro also how to install it. I will install .NET on a Linux Mint 18.2 64-bit distro. First we must add the .NET repository:
- Download the package from Microsoft
- Then install
Note: this is for Ubuntu version 18.04, for other versions and distributions please check at https://docs.microsoft.com/id-id/dotnet/core/install/linux-package-manager-ubuntu-1804
Then, we can install .NET with the command:
sudo add-apt-repository universe sudo apt-get update sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install dotnet-sdk-3.1 -y
Stove until the process is complete.
Image Source PetaniKode
After that, to ensure that .NET is installed correctly, try typing the command"dotnet --version".
Create New Project
Please open a terminal, then type the following command to create a C# .NET project
dotnet new console -o HelloApp
Description:
- console is the kind of application we are going to create.
- HelloApp is the name of the project project.
Apart from console applications there are also other types of applications such as ASP for Web applications. We can see with dotnet new --help.

Type the following command:
code HelloApp
Then it opens like this:

There may be some misunderstandings in writing please note, this tutorial is helpful.



