Skip to content
On this page

HelloWorld

csharp
using System;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}
  • C#程序是(由类组成的)。
  • 入口方法是程序的起点。C#程序的入口方法是(static void Main(string[] args))。
  • C#命令是怎样结束的?(分号结束)请注意,必须是半角(英文输入法)的分号。