paulgorman.org/technical

C# (on Linux)

(May 2019)

C# is a C-like object-oriented language from Microsoft. The Mono project brings C# to Linux.

#  apt install mono-mcs mono-csharp-shell

…and/or https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

C# source files use the file extension .cs.

$  dotnet new console --output hello
$  dotnet run --project hello

The file hello/Program.cs:

using System;

namespace hello
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}