class Hello {
  // main method
  static void Main(string[] args)
  {
    // Output: Hello, world!
    Console.WriteLine("Hello, world!");
  }
}

Compiling and running (make sure you are in the project directory)

$ dotnet run
Hello, world!
Comments