If you already installed .NET SDK, you can run
dotnet repl
then, you can write your
Console.WriteLine("Hello world");