Privacy Policy
Snippets index

  dotnet

Example of a simple C# console application that prints "Hello, World!" to the console using top-level statements:

dotnet new console -n HelloWorldApp
cd HelloWorldApp
cat Program.cs

    // Program.cs
    using System;
    Console.WriteLine("Hello, World!");

dotnet run