Entry point Main() nhận string[] args.
static void Main(string[] args)
args chứa các đối số. Ví dụ 2 args: var args = new string[] {"arg1","arg2"};
Ví dụ
using System;
namespace Demo {
class HelloWorld {
static void Main(string[] args) {
Console.WriteLine("Welcome here!");
Console.ReadKey();
}
}
}
Biên dịch command-line: csc helloworld.cs -> helloworld.exe -> chạy helloworld.